|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.evernote.edam.userstore.UserStore.Client
public static class UserStore.Client
Constructor Summary | |
---|---|
UserStore.Client(com.evernote.thrift.protocol.TProtocol prot)
|
|
UserStore.Client(com.evernote.thrift.protocol.TProtocol iprot,
com.evernote.thrift.protocol.TProtocol oprot)
|
Method Summary | |
---|---|
AuthenticationResult |
authenticate(java.lang.String username,
java.lang.String password,
java.lang.String consumerKey,
java.lang.String consumerSecret,
boolean supportsTwoFactor)
This is used to check a username and password in order to create a short-lived authentication session that can be used for further actions. |
AuthenticationResult |
authenticateLongSession(java.lang.String username,
java.lang.String password,
java.lang.String consumerKey,
java.lang.String consumerSecret,
java.lang.String deviceIdentifier,
java.lang.String deviceDescription,
boolean supportsTwoFactor)
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. |
AuthenticationResult |
authenticateToBusiness(java.lang.String authenticationToken)
This is used to take an existing authentication token that grants access to an individual user account (returned from 'authenticate', 'authenticateLongSession' or an OAuth authorization) and obtain an additional authentication token that may be used to access business notebooks if the user is a member of an Evernote Business account. |
boolean |
checkVersion(java.lang.String clientName,
short edamVersionMajor,
short edamVersionMinor)
This should be the first call made by a client to the EDAM service. |
AuthenticationResult |
completeTwoFactorAuthentication(java.lang.String authenticationToken,
java.lang.String oneTimeCode,
java.lang.String deviceIdentifier,
java.lang.String deviceDescription)
Complete the authentication process when a second factor is required. |
BootstrapInfo |
getBootstrapInfo(java.lang.String locale)
This provides bootstrap information to the client. |
com.evernote.thrift.protocol.TProtocol |
getInputProtocol()
Get the TProtocol being used as the input (read) protocol. |
java.lang.String |
getNoteStoreUrl(java.lang.String authenticationToken)
Returns the URL that should be used to talk to the NoteStore for the account represented by the provided authenticationToken. |
com.evernote.thrift.protocol.TProtocol |
getOutputProtocol()
Get the TProtocol being used as the output (write) protocol. |
PremiumInfo |
getPremiumInfo(java.lang.String authenticationToken)
Returns information regarding a user's Premium account corresponding to the provided authentication token, or throws an exception if this token is not valid. |
PublicUserInfo |
getPublicUserInfo(java.lang.String username)
Asks the UserStore about the publicly available location information for a particular username. |
User |
getUser(java.lang.String authenticationToken)
Returns the User corresponding to the provided authentication token, or throws an exception if this token is not valid. |
AuthenticationResult |
recv_authenticate()
|
AuthenticationResult |
recv_authenticateLongSession()
|
AuthenticationResult |
recv_authenticateToBusiness()
|
boolean |
recv_checkVersion()
|
AuthenticationResult |
recv_completeTwoFactorAuthentication()
|
BootstrapInfo |
recv_getBootstrapInfo()
|
java.lang.String |
recv_getNoteStoreUrl()
|
PremiumInfo |
recv_getPremiumInfo()
|
PublicUserInfo |
recv_getPublicUserInfo()
|
User |
recv_getUser()
|
AuthenticationResult |
recv_refreshAuthentication()
|
void |
recv_revokeLongSession()
|
AuthenticationResult |
refreshAuthentication(java.lang.String authenticationToken)
This is used to take an existing authentication token (returned from 'authenticate') and exchange it for a newer token which will not expire as soon. |
void |
revokeLongSession(java.lang.String authenticationToken)
Revoke an existing long lived authentication token. |
void |
send_authenticate(java.lang.String username,
java.lang.String password,
java.lang.String consumerKey,
java.lang.String consumerSecret,
boolean supportsTwoFactor)
|
void |
send_authenticateLongSession(java.lang.String username,
java.lang.String password,
java.lang.String consumerKey,
java.lang.String consumerSecret,
java.lang.String deviceIdentifier,
java.lang.String deviceDescription,
boolean supportsTwoFactor)
|
void |
send_authenticateToBusiness(java.lang.String authenticationToken)
|
void |
send_checkVersion(java.lang.String clientName,
short edamVersionMajor,
short edamVersionMinor)
|
void |
send_completeTwoFactorAuthentication(java.lang.String authenticationToken,
java.lang.String oneTimeCode,
java.lang.String deviceIdentifier,
java.lang.String deviceDescription)
|
void |
send_getBootstrapInfo(java.lang.String locale)
|
void |
send_getNoteStoreUrl(java.lang.String authenticationToken)
|
void |
send_getPremiumInfo(java.lang.String authenticationToken)
|
void |
send_getPublicUserInfo(java.lang.String username)
|
void |
send_getUser(java.lang.String authenticationToken)
|
void |
send_refreshAuthentication(java.lang.String authenticationToken)
|
void |
send_revokeLongSession(java.lang.String authenticationToken)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserStore.Client(com.evernote.thrift.protocol.TProtocol prot)
public UserStore.Client(com.evernote.thrift.protocol.TProtocol iprot, com.evernote.thrift.protocol.TProtocol oprot)
Method Detail |
---|
public com.evernote.thrift.protocol.TProtocol getInputProtocol()
com.evernote.thrift.TServiceClient
getInputProtocol
in interface com.evernote.thrift.TServiceClient
public com.evernote.thrift.protocol.TProtocol getOutputProtocol()
com.evernote.thrift.TServiceClient
getOutputProtocol
in interface com.evernote.thrift.TServiceClient
public boolean checkVersion(java.lang.String clientName, short edamVersionMajor, short edamVersionMinor) throws com.evernote.thrift.TException
UserStoreIface
checkVersion
in interface UserStoreIface
clientName
- This string provides some information about the client for
tracking/logging on the service. It should provide information about
the client's software and platform. The structure should be:
application/version; platform/version; [ device/version ]
E.g. "Evernote Windows/3.0.1; Windows/XP SP3".edamVersionMajor
- This should be the major protocol version that was compiled by the
client. This should be the current value of the EDAM_VERSION_MAJOR
constant for the client.edamVersionMinor
- This should be the major protocol version that was compiled by the
client. This should be the current value of the EDAM_VERSION_MINOR
constant for the client.
com.evernote.thrift.TException
public void send_checkVersion(java.lang.String clientName, short edamVersionMajor, short edamVersionMinor) throws com.evernote.thrift.TException
com.evernote.thrift.TException
public boolean recv_checkVersion() throws com.evernote.thrift.TException
com.evernote.thrift.TException
public BootstrapInfo getBootstrapInfo(java.lang.String locale) throws com.evernote.thrift.TException
UserStoreIface
getBootstrapInfo
in interface UserStoreIface
locale
- The client's current locale, expressed in language[_country]
format. E.g., "en_US". See ISO-639 and ISO-3166 for valid
language and country codes.
com.evernote.thrift.TException
public void send_getBootstrapInfo(java.lang.String locale) throws com.evernote.thrift.TException
com.evernote.thrift.TException
public BootstrapInfo recv_getBootstrapInfo() throws com.evernote.thrift.TException
com.evernote.thrift.TException
public AuthenticationResult authenticate(java.lang.String username, java.lang.String password, java.lang.String consumerKey, java.lang.String consumerSecret, boolean supportsTwoFactor) throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
UserStoreIface
authenticate
in interface UserStoreIface
username
- The username (not numeric user ID) for the account to
authenticate against. This function will also accept the user's
registered email address in this parameter.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 (e.g. 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.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.
The result of the authentication. If the authentication was successful, the AuthenticationResult.user field will be set with the full information about the User.
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.
EDAMUserException
- EDAMSystemException
com.evernote.thrift.TException
public void send_authenticate(java.lang.String username, java.lang.String password, java.lang.String consumerKey, java.lang.String consumerSecret, boolean supportsTwoFactor) throws com.evernote.thrift.TException
com.evernote.thrift.TException
public AuthenticationResult recv_authenticate() throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
EDAMUserException
EDAMSystemException
com.evernote.thrift.TException
public AuthenticationResult authenticateLongSession(java.lang.String username, java.lang.String password, java.lang.String consumerKey, java.lang.String consumerSecret, java.lang.String deviceIdentifier, java.lang.String deviceDescription, boolean supportsTwoFactor) throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
UserStoreIface
authenticateLongSession
in interface UserStoreIface
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, no more than 32 characters in length, 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.
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.
EDAMUserException
- EDAMSystemException
com.evernote.thrift.TException
public void send_authenticateLongSession(java.lang.String username, java.lang.String password, java.lang.String consumerKey, java.lang.String consumerSecret, java.lang.String deviceIdentifier, java.lang.String deviceDescription, boolean supportsTwoFactor) throws com.evernote.thrift.TException
com.evernote.thrift.TException
public AuthenticationResult recv_authenticateLongSession() throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
EDAMUserException
EDAMSystemException
com.evernote.thrift.TException
public AuthenticationResult completeTwoFactorAuthentication(java.lang.String authenticationToken, java.lang.String oneTimeCode, java.lang.String deviceIdentifier, java.lang.String deviceDescription) throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
UserStoreIface
completeTwoFactorAuthentication
in interface UserStoreIface
authenticationToken
- An authentication token returned by a previous
call to UserStore.authenticate or UserStore.authenticateLongSession that
could not be completed in a single call because a second factor was required.oneTimeCode
- The one time code entered by the user. This value is delivered
out-of-band, typically via SMS or an authenticator application.deviceIdentifier
- See the corresponding parameter in authenticateLongSession.deviceDescription
- See the corresponding parameter in authenticateLongSession.
EDAMUserException
- EDAMSystemException
com.evernote.thrift.TException
public void send_completeTwoFactorAuthentication(java.lang.String authenticationToken, java.lang.String oneTimeCode, java.lang.String deviceIdentifier, java.lang.String deviceDescription) throws com.evernote.thrift.TException
com.evernote.thrift.TException
public AuthenticationResult recv_completeTwoFactorAuthentication() throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
EDAMUserException
EDAMSystemException
com.evernote.thrift.TException
public void revokeLongSession(java.lang.String authenticationToken) throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
UserStoreIface
revokeLongSession
in interface UserStoreIface
authenticationToken
- the authentication token to revoke.
EDAMUserException
- EDAMSystemException
com.evernote.thrift.TException
public void send_revokeLongSession(java.lang.String authenticationToken) throws com.evernote.thrift.TException
com.evernote.thrift.TException
public void recv_revokeLongSession() throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
EDAMUserException
EDAMSystemException
com.evernote.thrift.TException
public AuthenticationResult authenticateToBusiness(java.lang.String authenticationToken) throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
UserStoreIface
authenticateToBusiness
in interface UserStoreIface
authenticationToken
- The authentication token for the user. This may not be a shared authentication
token (returned by NoteStore.authenticateToSharedNotebook or
NoteStore.authenticateToSharedNote) or a business authentication token.
EDAMUserException
- EDAMSystemException
com.evernote.thrift.TException
public void send_authenticateToBusiness(java.lang.String authenticationToken) throws com.evernote.thrift.TException
com.evernote.thrift.TException
public AuthenticationResult recv_authenticateToBusiness() throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
EDAMUserException
EDAMSystemException
com.evernote.thrift.TException
public AuthenticationResult refreshAuthentication(java.lang.String authenticationToken) throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
UserStoreIface
refreshAuthentication
in interface UserStoreIface
authenticationToken
- The previous authentication token from the authenticate() result.
EDAMUserException
EDAMSystemException
com.evernote.thrift.TException
public void send_refreshAuthentication(java.lang.String authenticationToken) throws com.evernote.thrift.TException
com.evernote.thrift.TException
public AuthenticationResult recv_refreshAuthentication() throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
EDAMUserException
EDAMSystemException
com.evernote.thrift.TException
public User getUser(java.lang.String authenticationToken) throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
UserStoreIface
getUser
in interface UserStoreIface
EDAMUserException
EDAMSystemException
com.evernote.thrift.TException
public void send_getUser(java.lang.String authenticationToken) throws com.evernote.thrift.TException
com.evernote.thrift.TException
public User recv_getUser() throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
EDAMUserException
EDAMSystemException
com.evernote.thrift.TException
public PublicUserInfo getPublicUserInfo(java.lang.String username) throws EDAMNotFoundException, EDAMSystemException, EDAMUserException, com.evernote.thrift.TException
UserStoreIface
getPublicUserInfo
in interface UserStoreIface
EDAMUserException
- EDAMNotFoundException
EDAMSystemException
com.evernote.thrift.TException
public void send_getPublicUserInfo(java.lang.String username) throws com.evernote.thrift.TException
com.evernote.thrift.TException
public PublicUserInfo recv_getPublicUserInfo() throws EDAMNotFoundException, EDAMSystemException, EDAMUserException, com.evernote.thrift.TException
EDAMNotFoundException
EDAMSystemException
EDAMUserException
com.evernote.thrift.TException
public PremiumInfo getPremiumInfo(java.lang.String authenticationToken) throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
UserStoreIface
getPremiumInfo
in interface UserStoreIface
EDAMUserException
EDAMSystemException
com.evernote.thrift.TException
public void send_getPremiumInfo(java.lang.String authenticationToken) throws com.evernote.thrift.TException
com.evernote.thrift.TException
public PremiumInfo recv_getPremiumInfo() throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
EDAMUserException
EDAMSystemException
com.evernote.thrift.TException
public java.lang.String getNoteStoreUrl(java.lang.String authenticationToken) throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
UserStoreIface
getNoteStoreUrl
in interface UserStoreIface
EDAMUserException
EDAMSystemException
com.evernote.thrift.TException
public void send_getNoteStoreUrl(java.lang.String authenticationToken) throws com.evernote.thrift.TException
com.evernote.thrift.TException
public java.lang.String recv_getNoteStoreUrl() throws EDAMUserException, EDAMSystemException, com.evernote.thrift.TException
EDAMUserException
EDAMSystemException
com.evernote.thrift.TException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |