|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface UserStore.Iface
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:
Method Summary | |
---|---|
AuthenticationResult |
authenticate(java.lang.String username,
java.lang.String password,
java.lang.String consumerKey,
java.lang.String consumerSecret)
This is used to check a username and password in order to create an authentication session that could be used for further actions. |
boolean |
checkVersion(java.lang.String clientName,
short edamVersionMajor,
short edamVersionMinor)
This should be the first call made by a client to the EDAM service. |
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 |
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. |
Method Detail |
---|
boolean checkVersion(java.lang.String clientName, short edamVersionMajor, short edamVersionMinor) throws org.apache.thrift.TException
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" or
"Evernote Clipper/1.0.1; JME/2.0; Motorola RAZR/2.0;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.clientName
- edamVersionMajor
- edamVersionMinor
-
org.apache.thrift.TException
AuthenticationResult authenticate(java.lang.String username, java.lang.String password, java.lang.String consumerKey, java.lang.String consumerSecret) throws EDAMUserException, EDAMSystemException, org.apache.thrift.TException
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
- A unique identifier for this client application, provided by Evernote
to developers who request an API key. This must be provided to identify
the client.consumerSecret
- If the client was given a "consumer secret" when the API key was issued,
it must be provided here to authenticate the application itself.username
- password
- consumerKey
- consumerSecret
-
EDAMUserException
- EDAMSystemException
org.apache.thrift.TException
AuthenticationResult refreshAuthentication(java.lang.String authenticationToken) throws EDAMUserException, EDAMSystemException, org.apache.thrift.TException
authenticationToken
- The previous authentication token from the authenticate() result.authenticationToken
-
EDAMUserException
EDAMSystemException
org.apache.thrift.TException
User getUser(java.lang.String authenticationToken) throws EDAMUserException, EDAMSystemException, org.apache.thrift.TException
authenticationToken
-
EDAMUserException
EDAMSystemException
org.apache.thrift.TException
PublicUserInfo getPublicUserInfo(java.lang.String username) throws EDAMNotFoundException, EDAMSystemException, EDAMUserException, org.apache.thrift.TException
username
-
EDAMUserException
- EDAMNotFoundException
EDAMSystemException
org.apache.thrift.TException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |