com.evernote.edam.userstore
Class AuthenticationResult

java.lang.Object
  extended by com.evernote.edam.userstore.AuthenticationResult
All Implemented Interfaces:
com.evernote.thrift.TBase<AuthenticationResult>, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<AuthenticationResult>

public class AuthenticationResult
extends java.lang.Object
implements com.evernote.thrift.TBase<AuthenticationResult>, java.io.Serializable, java.lang.Cloneable

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

currentTime:
The server-side date and time when this result was generated.
authenticationToken:
Holds an opaque, ASCII-encoded token that can be used by the client to perform actions on a NoteStore.
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.
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.
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.
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.
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.
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.
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?

See Also:
Serialized Form

Constructor Summary
AuthenticationResult()
           
AuthenticationResult(AuthenticationResult other)
          Performs a deep copy on other.
AuthenticationResult(long currentTime, java.lang.String authenticationToken, long expiration)
           
 
Method Summary
 void clear()
          Return to the state of having just been initialized, as though you had just called the default constructor.
 int compareTo(AuthenticationResult other)
           
 AuthenticationResult deepCopy()
          Creates a deep copy of the object.
 boolean equals(AuthenticationResult that)
           
 boolean equals(java.lang.Object that)
           
 java.lang.String getAuthenticationToken()
           
 long getCurrentTime()
           
 long getExpiration()
           
 java.lang.String getNoteStoreUrl()
           
 PublicUserInfo getPublicUserInfo()
           
 java.lang.String getSecondFactorDeliveryHint()
           
 User getUser()
           
 java.lang.String getWebApiUrlPrefix()
           
 int hashCode()
           
 boolean isSecondFactorRequired()
           
 boolean isSetAuthenticationToken()
          Returns true if field authenticationToken is set (has been asigned a value) and false otherwise
 boolean isSetCurrentTime()
          Returns true if field currentTime is set (has been asigned a value) and false otherwise
 boolean isSetExpiration()
          Returns true if field expiration is set (has been asigned a value) and false otherwise
 boolean isSetNoteStoreUrl()
          Returns true if field noteStoreUrl is set (has been asigned a value) and false otherwise
 boolean isSetPublicUserInfo()
          Returns true if field publicUserInfo is set (has been asigned a value) and false otherwise
 boolean isSetSecondFactorDeliveryHint()
          Returns true if field secondFactorDeliveryHint is set (has been asigned a value) and false otherwise
 boolean isSetSecondFactorRequired()
          Returns true if field secondFactorRequired is set (has been asigned a value) and false otherwise
 boolean isSetUser()
          Returns true if field user is set (has been asigned a value) and false otherwise
 boolean isSetWebApiUrlPrefix()
          Returns true if field webApiUrlPrefix is set (has been asigned a value) and false otherwise
 void read(com.evernote.thrift.protocol.TProtocol iprot)
          Reads an instance of the object from the given protocol.
 void setAuthenticationToken(java.lang.String authenticationToken)
           
 void setAuthenticationTokenIsSet(boolean value)
           
 void setCurrentTime(long currentTime)
           
 void setCurrentTimeIsSet(boolean value)
           
 void setExpiration(long expiration)
           
 void setExpirationIsSet(boolean value)
           
 void setNoteStoreUrl(java.lang.String noteStoreUrl)
           
 void setNoteStoreUrlIsSet(boolean value)
           
 void setPublicUserInfo(PublicUserInfo publicUserInfo)
           
 void setPublicUserInfoIsSet(boolean value)
           
 void setSecondFactorDeliveryHint(java.lang.String secondFactorDeliveryHint)
           
 void setSecondFactorDeliveryHintIsSet(boolean value)
           
 void setSecondFactorRequired(boolean secondFactorRequired)
           
 void setSecondFactorRequiredIsSet(boolean value)
           
 void setUser(User user)
           
 void setUserIsSet(boolean value)
           
 void setWebApiUrlPrefix(java.lang.String webApiUrlPrefix)
           
 void setWebApiUrlPrefixIsSet(boolean value)
           
 java.lang.String toString()
           
 void unsetAuthenticationToken()
           
 void unsetCurrentTime()
           
 void unsetExpiration()
           
 void unsetNoteStoreUrl()
           
 void unsetPublicUserInfo()
           
 void unsetSecondFactorDeliveryHint()
           
 void unsetSecondFactorRequired()
           
 void unsetUser()
           
 void unsetWebApiUrlPrefix()
           
 void validate()
           
 void write(com.evernote.thrift.protocol.TProtocol oprot)
          Writes the object to the given protocol.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuthenticationResult

public AuthenticationResult()

AuthenticationResult

public AuthenticationResult(long currentTime,
                            java.lang.String authenticationToken,
                            long expiration)

AuthenticationResult

public AuthenticationResult(AuthenticationResult other)
Performs a deep copy on other.

Method Detail

deepCopy

public AuthenticationResult deepCopy()
Description copied from interface: com.evernote.thrift.TBase
Creates a deep copy of the object.

Specified by:
deepCopy in interface com.evernote.thrift.TBase<AuthenticationResult>

clear

public void clear()
Description copied from interface: com.evernote.thrift.TBase
Return to the state of having just been initialized, as though you had just called the default constructor.

Specified by:
clear in interface com.evernote.thrift.TBase<AuthenticationResult>

getCurrentTime

public long getCurrentTime()

setCurrentTime

public void setCurrentTime(long currentTime)

unsetCurrentTime

public void unsetCurrentTime()

isSetCurrentTime

public boolean isSetCurrentTime()
Returns true if field currentTime is set (has been asigned a value) and false otherwise


setCurrentTimeIsSet

public void setCurrentTimeIsSet(boolean value)

getAuthenticationToken

public java.lang.String getAuthenticationToken()

setAuthenticationToken

public void setAuthenticationToken(java.lang.String authenticationToken)

unsetAuthenticationToken

public void unsetAuthenticationToken()

isSetAuthenticationToken

public boolean isSetAuthenticationToken()
Returns true if field authenticationToken is set (has been asigned a value) and false otherwise


setAuthenticationTokenIsSet

public void setAuthenticationTokenIsSet(boolean value)

getExpiration

public long getExpiration()

setExpiration

public void setExpiration(long expiration)

unsetExpiration

public void unsetExpiration()

isSetExpiration

public boolean isSetExpiration()
Returns true if field expiration is set (has been asigned a value) and false otherwise


setExpirationIsSet

public void setExpirationIsSet(boolean value)

getUser

public User getUser()

setUser

public void setUser(User user)

unsetUser

public void unsetUser()

isSetUser

public boolean isSetUser()
Returns true if field user is set (has been asigned a value) and false otherwise


setUserIsSet

public void setUserIsSet(boolean value)

getPublicUserInfo

public PublicUserInfo getPublicUserInfo()

setPublicUserInfo

public void setPublicUserInfo(PublicUserInfo publicUserInfo)

unsetPublicUserInfo

public void unsetPublicUserInfo()

isSetPublicUserInfo

public boolean isSetPublicUserInfo()
Returns true if field publicUserInfo is set (has been asigned a value) and false otherwise


setPublicUserInfoIsSet

public void setPublicUserInfoIsSet(boolean value)

getNoteStoreUrl

public java.lang.String getNoteStoreUrl()

setNoteStoreUrl

public void setNoteStoreUrl(java.lang.String noteStoreUrl)

unsetNoteStoreUrl

public void unsetNoteStoreUrl()

isSetNoteStoreUrl

public boolean isSetNoteStoreUrl()
Returns true if field noteStoreUrl is set (has been asigned a value) and false otherwise


setNoteStoreUrlIsSet

public void setNoteStoreUrlIsSet(boolean value)

getWebApiUrlPrefix

public java.lang.String getWebApiUrlPrefix()

setWebApiUrlPrefix

public void setWebApiUrlPrefix(java.lang.String webApiUrlPrefix)

unsetWebApiUrlPrefix

public void unsetWebApiUrlPrefix()

isSetWebApiUrlPrefix

public boolean isSetWebApiUrlPrefix()
Returns true if field webApiUrlPrefix is set (has been asigned a value) and false otherwise


setWebApiUrlPrefixIsSet

public void setWebApiUrlPrefixIsSet(boolean value)

isSecondFactorRequired

public boolean isSecondFactorRequired()

setSecondFactorRequired

public void setSecondFactorRequired(boolean secondFactorRequired)

unsetSecondFactorRequired

public void unsetSecondFactorRequired()

isSetSecondFactorRequired

public boolean isSetSecondFactorRequired()
Returns true if field secondFactorRequired is set (has been asigned a value) and false otherwise


setSecondFactorRequiredIsSet

public void setSecondFactorRequiredIsSet(boolean value)

getSecondFactorDeliveryHint

public java.lang.String getSecondFactorDeliveryHint()

setSecondFactorDeliveryHint

public void setSecondFactorDeliveryHint(java.lang.String secondFactorDeliveryHint)

unsetSecondFactorDeliveryHint

public void unsetSecondFactorDeliveryHint()

isSetSecondFactorDeliveryHint

public boolean isSetSecondFactorDeliveryHint()
Returns true if field secondFactorDeliveryHint is set (has been asigned a value) and false otherwise


setSecondFactorDeliveryHintIsSet

public void setSecondFactorDeliveryHintIsSet(boolean value)

equals

public boolean equals(java.lang.Object that)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(AuthenticationResult that)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(AuthenticationResult other)
Specified by:
compareTo in interface java.lang.Comparable<AuthenticationResult>

read

public void read(com.evernote.thrift.protocol.TProtocol iprot)
          throws com.evernote.thrift.TException
Description copied from interface: com.evernote.thrift.TBase
Reads an instance of the object from the given protocol.

Specified by:
read in interface com.evernote.thrift.TBase<AuthenticationResult>
Parameters:
iprot - Input protocol
Throws:
com.evernote.thrift.TException

write

public void write(com.evernote.thrift.protocol.TProtocol oprot)
           throws com.evernote.thrift.TException
Description copied from interface: com.evernote.thrift.TBase
Writes the object to the given protocol.

Specified by:
write in interface com.evernote.thrift.TBase<AuthenticationResult>
Parameters:
oprot - Output protocol
Throws:
com.evernote.thrift.TException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

validate

public void validate()
              throws com.evernote.thrift.TException
Throws:
com.evernote.thrift.TException