Class: Evernote::EDAM::UserStore::AuthenticationResult

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/Evernote/EDAM/user_store_types.rb

Overview

When an authentication (or re-authentication) is performed, this structure

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>
</dl>

Constant Summary collapse

CURRENTTIME =
1
AUTHENTICATIONTOKEN =
2
EXPIRATION =
3
USER =
4
PUBLICUSERINFO =
5
NOTESTOREURL =
6
WEBAPIURLPREFIX =
7
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}
}

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_fieldsObject



248
# File 'lib/Evernote/EDAM/user_store_types.rb', line 248

def struct_fields; FIELDS; end

#validateObject



250
251
252
253
254
# File 'lib/Evernote/EDAM/user_store_types.rb', line 250

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