|
virtual QString | userStoreUrl () const =0 |
|
virtual void | setUserStoreUrl (QString url)=0 |
|
virtual bool | checkVersion (QString clientName, qint16 edamVersionMajor=EDAM_VERSION_MAJOR, qint16 edamVersionMinor=EDAM_VERSION_MINOR, IRequestContextPtr ctx={})=0 |
|
virtual AsyncResult * | checkVersionAsync (QString clientName, qint16 edamVersionMajor=EDAM_VERSION_MAJOR, qint16 edamVersionMinor=EDAM_VERSION_MINOR, IRequestContextPtr ctx={})=0 |
|
virtual BootstrapInfo | getBootstrapInfo (QString locale, IRequestContextPtr ctx={})=0 |
|
virtual AsyncResult * | getBootstrapInfoAsync (QString locale, IRequestContextPtr ctx={})=0 |
|
virtual AuthenticationResult | authenticateLongSession (QString username, QString password, QString consumerKey, QString consumerSecret, QString deviceIdentifier, QString deviceDescription, bool supportsTwoFactor, IRequestContextPtr ctx={})=0 |
|
virtual AsyncResult * | authenticateLongSessionAsync (QString username, QString password, QString consumerKey, QString consumerSecret, QString deviceIdentifier, QString deviceDescription, bool supportsTwoFactor, IRequestContextPtr ctx={})=0 |
|
virtual AuthenticationResult | completeTwoFactorAuthentication (QString oneTimeCode, QString deviceIdentifier, QString deviceDescription, IRequestContextPtr ctx={})=0 |
|
virtual AsyncResult * | completeTwoFactorAuthenticationAsync (QString oneTimeCode, QString deviceIdentifier, QString deviceDescription, IRequestContextPtr ctx={})=0 |
|
virtual void | revokeLongSession (IRequestContextPtr ctx={})=0 |
|
virtual AsyncResult * | revokeLongSessionAsync (IRequestContextPtr ctx={})=0 |
|
virtual AuthenticationResult | authenticateToBusiness (IRequestContextPtr ctx={})=0 |
|
virtual AsyncResult * | authenticateToBusinessAsync (IRequestContextPtr ctx={})=0 |
|
virtual User | getUser (IRequestContextPtr ctx={})=0 |
|
virtual AsyncResult * | getUserAsync (IRequestContextPtr ctx={})=0 |
|
virtual PublicUserInfo | getPublicUserInfo (QString username, IRequestContextPtr ctx={})=0 |
|
virtual AsyncResult * | getPublicUserInfoAsync (QString username, IRequestContextPtr ctx={})=0 |
|
virtual UserUrls | getUserUrls (IRequestContextPtr ctx={})=0 |
|
virtual AsyncResult * | getUserUrlsAsync (IRequestContextPtr ctx={})=0 |
|
virtual void | inviteToBusiness (QString emailAddress, IRequestContextPtr ctx={})=0 |
|
virtual AsyncResult * | inviteToBusinessAsync (QString emailAddress, IRequestContextPtr ctx={})=0 |
|
virtual void | removeFromBusiness (QString emailAddress, IRequestContextPtr ctx={})=0 |
|
virtual AsyncResult * | removeFromBusinessAsync (QString emailAddress, IRequestContextPtr ctx={})=0 |
|
virtual void | updateBusinessUserIdentifier (QString oldEmailAddress, QString newEmailAddress, IRequestContextPtr ctx={})=0 |
|
virtual AsyncResult * | updateBusinessUserIdentifierAsync (QString oldEmailAddress, QString newEmailAddress, IRequestContextPtr ctx={})=0 |
|
virtual QList< UserProfile > | listBusinessUsers (IRequestContextPtr ctx={})=0 |
|
virtual AsyncResult * | listBusinessUsersAsync (IRequestContextPtr ctx={})=0 |
|
virtual QList< BusinessInvitation > | listBusinessInvitations (bool includeRequestedInvitations, IRequestContextPtr ctx={})=0 |
|
virtual AsyncResult * | listBusinessInvitationsAsync (bool includeRequestedInvitations, IRequestContextPtr ctx={})=0 |
|
virtual AccountLimits | getAccountLimits (ServiceLevel serviceLevel, IRequestContextPtr ctx={})=0 |
|
virtual AsyncResult * | getAccountLimitsAsync (ServiceLevel serviceLevel, IRequestContextPtr ctx={})=0 |
|
Service: UserStore
The UserStore service is primarily used by EDAM clients to establish authentication via username and password over a trusted connection (e.g. SSL). A client's first call to this interface should be checkVersion() to ensure that the client's software is up to date.
All calls which require an authenticationToken may throw an EDAMUserException for the following reasons:
-
AUTH_EXPIRED "authenticationToken" - token has expired
-
BAD_DATA_FORMAT "authenticationToken" - token is malformed
-
DATA_REQUIRED "authenticationToken" - token is empty
-
INVALID_AUTH "authenticationToken" - token signature is invalid
-
PERMISSION_DENIED "authenticationToken" - token does not convey sufficient privileges
virtual AuthenticationResult qevercloud::IUserStore::authenticateLongSession |
( |
QString |
username, |
|
|
QString |
password, |
|
|
QString |
consumerKey, |
|
|
QString |
consumerSecret, |
|
|
QString |
deviceIdentifier, |
|
|
QString |
deviceDescription, |
|
|
bool |
supportsTwoFactor, |
|
|
IRequestContextPtr |
ctx = {} |
|
) |
| |
|
pure virtual |
This is used to check a username and password in order to create a long-lived authentication token that can be used for further actions.
This function is not available to most third party applications, which typically authenticate using OAuth as described at dev.evernote.com. If you believe that your application requires permission to authenticate using username and password instead of OAuth, please contact Evernote developer support by visiting dev.evernote.com.
- Parameters
-
username | The username or registered email address of the account to authenticate against. |
password | The plaintext password to check against the account. Since this is not protected by the EDAM protocol, this information must be provided over a protected transport (i.e. SSL). |
consumerKey | The "consumer key" portion of the API key issued to the client application by Evernote. |
consumerSecret | The "consumer secret" portion of the API key issued to the client application by Evernote. |
deviceIdentifier | An optional string that uniquely identifies the device from which the authentication is being performed. This string allows the service to return the same authentication token when a given application requests authentication repeatedly from the same device. This may happen when the user logs out of an application and then logs back in, or when the application is uninstalled and later reinstalled. If no reliable device identifier can be created, this value should be omitted. If set, the device identifier must be between 1 and EDAM_DEVICE_ID_LEN_MAX characters long and must match the regular expression EDAM_DEVICE_ID_REGEX. |
deviceDescription | A description of the device from which the authentication is being performed. This field is displayed to the user in a list of authorized applications to allow them to distinguish between multiple tokens issued to the same client application on different devices. For example, the Evernote iOS client on a user's iPhone and iPad might pass the iOS device names "Bob's iPhone" and "Bob's iPad". The device description must be between 1 and EDAM_DEVICE_DESCRIPTION_LEN_MAX characters long and must match the regular expression EDAM_DEVICE_DESCRIPTION_REGEX. |
supportsTwoFactor | Whether the calling application supports two-factor authentication. If this parameter is false, this method will fail with the error code INVALID_AUTH and the parameter "password" when called for a user who has enabled two-factor authentication. |
- Returns
The result of the authentication. The level of detail provided in the returned AuthenticationResult.User structure depends on the access level granted by calling application's API key.
If the user has two-factor authentication enabled, AuthenticationResult.secondFactorRequired will be set and AuthenticationResult.authenticationToken will contain a short-lived token that may only be used to complete the two-factor authentication process by calling UserStore.completeTwoFactorAuthentication.
- Exceptions
-
EDAMUserException |
-
DATA_REQUIRED "username" - username is empty
-
DATA_REQUIRED "password" - password is empty
-
DATA_REQUIRED "consumerKey" - consumerKey is empty
-
DATA_REQUIRED "consumerSecret" - consumerSecret is empty
-
DATA_REQUIRED "deviceDescription" - deviceDescription is empty
-
BAD_DATA_FORMAT "deviceDescription" - deviceDescription is not valid.
-
BAD_DATA_FORMAT "deviceIdentifier" - deviceIdentifier is not valid.
-
INVALID_AUTH "username" - username not found
-
INVALID_AUTH "password" - password did not match
-
INVALID_AUTH "consumerKey" - consumerKey is not authorized
-
INVALID_AUTH "consumerSecret" - consumerSecret is incorrect
-
INVALID_AUTH "businessOnly" - the user is a business-only account
-
PERMISSION_DENIED "User.active" - user account is closed
-
PERMISSION_DENIED "User.tooManyFailuresTryAgainLater" - user has failed authentication too often
-
AUTH_EXPIRED "password" - user password is expired
|
Returns a list of active business users in a given business.
Clients are required to cache this information and re-fetch no more than once per day or when they encountered a user ID or username that was not known to them.
To avoid excessive look ups, clients should also track user IDs and usernames that belong to users who are not in the business, since they will not be included in the result.
I.e., when a client encounters a previously unknown user ID as a note's creator, it may query listBusinessUsers to find information about this user. If the user is not in the resulting list, the client should track that fact and not re-query the service the next time that it sees this user on a note.
- Parameters
-
authenticationToken | A business authentication token returned by authenticateToBusiness or with sufficient privileges to manage Evernote Business membership. |
virtual void qevercloud::IUserStore::updateBusinessUserIdentifier |
( |
QString |
oldEmailAddress, |
|
|
QString |
newEmailAddress, |
|
|
IRequestContextPtr |
ctx = {} |
|
) |
| |
|
pure virtual |
Update the email address used to uniquely identify an Evernote Business user.
This will update the identifier for a user who was previously invited using inviteToBusiness, ensuring that caller and the Evernote service maintain an agreed-upon identifier for a specific user.
For example, the following sequence of calls would invite a user to join a business, update their email address, and then remove the user from the business using the updated email address.
inviteToBusiness("foo@bar.com") updateBusinessUserIdentifier("foo@bar.com", "baz@bar.com") removeFromBusiness("baz@bar.com")
- Parameters
-
authenticationToken | An authentication token with sufficient privileges to manage Evernote Business membership. |
oldEmailAddress | The existing email address used to uniquely identify the user. |
newEmailAddress | The new email address used to uniquely identify the user. |
- Exceptions
-
EDAMUserException |
-
DATA_REQUIRED "oldEmailAddress" - No old email address was provided
-
DATA_REQUIRED "newEmailAddress" - No new email address was provided
-
BAD_DATA_FORMAT "oldEmailAddress" - The old email address is not well formed
-
BAD_DATA_FORMAT "newEmailAddress" - The new email address is not well formed
-
DATA_CONFLICT "oldEmailAddress" - The old and new email addresses were the same
-
DATA_CONFLICT "newEmailAddress" - There is already an invitation or registered user with the provided new email address.
-
DATA_CONFLICT "invitation.externallyProvisioned" - The user identified by oldEmailAddress was not added via UserStore.inviteToBusiness and therefore cannot be updated.
|
EDAMNotFoundException |
-
"oldEmailAddress" - If there is no user or invitation with the specified oldEmailAddress in the business.
|