Class: Evernote::EDAM::UserStore::AuthenticationResult
- Inherits:
-
Object
- Object
- Evernote::EDAM::UserStore::AuthenticationResult
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/Evernote/EDAM/user_store_types.rb
Overview
provides the result to the client. <dl>
<dt>currentTime:</dt>
<dd>
The server-side date and time when this result was
generated.
</dd>
<dt>authenticationToken:</dt>
<dd>
Holds an opaque, ASCII-encoded token that can be
used by the client to perform actions on a NoteStore.
</dd>
<dt>expiration:</dt>
<dd>
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.
</dd>
<dt>user:</dt>
<dd>
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.
</dd>
<dt>publicUserInfo:</dt>
<dd>
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.
</dd>
<dt>noteStoreUrl:</dt>
<dd>
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.
</dd>
<dt>webApiUrlPrefix:</dt>
<dd>
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.
</dd>
<dt>secondFactorRequired:</dt>
<dd>
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.
</dd>
<dt>secondFactorDeliveryHint:</dt>
<dd>
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?
</dd>
</dl>
Constant Summary collapse
- CURRENTTIME =
1
- AUTHENTICATIONTOKEN =
2
- EXPIRATION =
3
- USER =
4
- PUBLICUSERINFO =
5
- NOTESTOREURL =
6
- WEBAPIURLPREFIX =
7
- SECONDFACTORREQUIRED =
8
- SECONDFACTORDELIVERYHINT =
9
- FIELDS =
{ CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'}, AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'}, EXPIRATION => {:type => ::Thrift::Types::I64, :name => 'expiration'}, USER => {:type => ::Thrift::Types::STRUCT, :name => 'user', :class => ::Evernote::EDAM::Type::User, :optional => true}, PUBLICUSERINFO => {:type => ::Thrift::Types::STRUCT, :name => 'publicUserInfo', :class => ::Evernote::EDAM::UserStore::PublicUserInfo, :optional => true}, NOTESTOREURL => {:type => ::Thrift::Types::STRING, :name => 'noteStoreUrl', :optional => true}, WEBAPIURLPREFIX => {:type => ::Thrift::Types::STRING, :name => 'webApiUrlPrefix', :optional => true}, SECONDFACTORREQUIRED => {:type => ::Thrift::Types::BOOL, :name => 'secondFactorRequired', :optional => true}, SECONDFACTORDELIVERYHINT => {:type => ::Thrift::Types::STRING, :name => 'secondFactorDeliveryHint', :optional => true} }
Constants included from Thrift::Struct_Union
Thrift::Struct_Union::CONTAINER_TYPES
Instance Method Summary collapse
Methods included from Thrift::Struct
#<=>, #==, #differences, #eql?, field_accessor, #fields_with_default_values, generate_accessors, #hash, #initialize, #inspect, qmark_isset_method, #read, #write
Methods included from Thrift::Struct_Union
#each_field, #field_info, #inspect_collection, #inspect_field, #is_container?, #name_to_id, #read_field, #sorted_field_ids, #write_container, #write_data
Instance Method Details
#struct_fields ⇒ Object
171 |
# File 'lib/Evernote/EDAM/user_store_types.rb', line 171 def struct_fields; FIELDS; end |
#validate ⇒ Object
173 174 175 176 177 |
# File 'lib/Evernote/EDAM/user_store_types.rb', line 173 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field currentTime is unset!') unless @currentTime raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field authenticationToken is unset!') unless @authenticationToken raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expiration is unset!') unless @expiration end |