QEverCloud
Unofficial Evernote Cloud API for Qt
Public Member Functions | Public Attributes | List of all members
qevercloud::AuthenticationResult Struct Reference

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

Public Member Functions

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

Public Attributes

QString authenticationToken
 Holds an opaque, ASCII-encoded token that can be used by the client to perform actions on a NoteStore.
 
Timestamp currentTime
 The server-side date and time when this result was generated.
 
Timestamp expiration
 Holds the server-side date and time when the authentication token will expire. More...
 
Optional< QString > 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. More...
 
Optional< PublicUserInfopublicUserInfo
 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 > secondFactorDeliveryHint
 When secondFactorRequired is set to true, this field may contain a string describing the second factor delivery method that the user has configured. More...
 
Optional< bool > 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. More...
 
Optional< Useruser
 Holds the information about the account which was authenticated if this was a full authentication. More...
 
Optional< QString > 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. More...
 

Detailed Description

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

Member Data Documentation

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< 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.