QEverCloud  3.0.0
Unofficial Evernote Cloud API for Qt
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Public Attributes | List of all members
qevercloud::AuthenticationResult Struct Reference

#include <types.h>

Public Member Functions

bool operator== (const AuthenticationResult &other) const
 
bool operator!= (const AuthenticationResult &other) const
 

Public Attributes

Timestamp currentTime
 
QString authenticationToken
 
Timestamp expiration
 
Optional< Useruser
 
Optional< PublicUserInfopublicUserInfo
 
Optional< QString > noteStoreUrl
 
Optional< QString > webApiUrlPrefix
 
Optional< bool > secondFactorRequired
 
Optional< QString > secondFactorDeliveryHint
 

Detailed Description

When an authentication (or re-authentication) is performed, this structure provides the result to the client.

Member Function Documentation

bool qevercloud::AuthenticationResult::operator!= ( const AuthenticationResult other) const
inline
bool qevercloud::AuthenticationResult::operator== ( const AuthenticationResult other) const
inline

Member Data Documentation

QString qevercloud::AuthenticationResult::authenticationToken

Holds an opaque, ASCII-encoded token that can be used by the client to perform actions on a NoteStore.

Timestamp qevercloud::AuthenticationResult::currentTime

The server-side date and time when this result was generated.

Timestamp qevercloud::AuthenticationResult::expiration

Holds the server-side date and time when the authentication token will expire. This time can be compared to "currentTime" to produce an expiration time that can be reconciled with the client's local clock.

Optional< QString > qevercloud::AuthenticationResult::noteStoreUrl

This field will contain the full URL that clients should use to make NoteStore requests to the server shard that contains that user's data. I.e. this is the URL that should be used to create the Thrift HTTP client transport to send messages to the NoteStore service for the account.

Optional< PublicUserInfo > qevercloud::AuthenticationResult::publicUserInfo

If this authentication result was achieved without full permissions to access the full User structure, this field may be set to give back a more limited public set of data.

Optional< QString > qevercloud::AuthenticationResult::secondFactorDeliveryHint

When secondFactorRequired is set to true, this field may contain a string describing the second factor delivery method that the user has configured. This will typically be an obfuscated mobile device number, such as "(xxx) xxx-x095". This string can be displayed to the user to remind them how to obtain the required second factor. TODO do we need to differentiate between SMS and voice delivery?

Optional< bool > qevercloud::AuthenticationResult::secondFactorRequired

If set to true, this field indicates that the user has enabled two-factor authentication and must enter their second factor in order to complete authentication. In this case the value of authenticationResult will be a short-lived authentication token that may only be used to make a subsequent call to completeTwoFactorAuthentication.

Optional< User > qevercloud::AuthenticationResult::user

Holds the information about the account which was authenticated if this was a full authentication. May be absent if this particular authentication did not require user information.

Optional< QString > qevercloud::AuthenticationResult::webApiUrlPrefix

This field will contain the initial part of the URLs that should be used to make requests to Evernote's thin client "web API", which provide optimized operations for clients that aren't capable of manipulating the full contents of accounts via the full Thrift data model. Clients should concatenate the relative path for the various servlets onto the end of this string to construct the full URL, as documented on our developer web site.