Class: WindowsLiveLogin::User

Inherits:
Object
  • Object
show all
Defined in:
lib/contacts/windowslivelogin.rb

Overview

Holds the user information after a successful sign-in.

‘timestamp’ is the time as obtained from the SSO token. ‘id’ is the pairwise unique ID for the user. ‘context’ is the application context that was originally passed to the sign-in request, if any. ‘token’ is the encrypted Web Authentication token that contains the UID. This can be cached in a cookie and the UID can be retrieved by calling the processToken method. ‘usePersistentCookie?’ indicates whether the application is expected to store the user token in a session or persistent cookie.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(timestamp, id, flags, context, token) ⇒ User

Initialize the User with time stamp, userid, flags, context and token.



381
382
383
384
385
386
387
# File 'lib/contacts/windowslivelogin.rb', line 381

def initialize(timestamp, id, flags, context, token)
  self.timestamp = timestamp
  self.id = id
  self.flags = flags
  self.context = context
  self.token = token
end

Instance Attribute Details

#contextObject

Returns the value of attribute context.



371
372
373
# File 'lib/contacts/windowslivelogin.rb', line 371

def context
  @context
end

#idObject

Returns the value of attribute id.



371
372
373
# File 'lib/contacts/windowslivelogin.rb', line 371

def id
  @id
end

#timestampObject

Returns the value of attribute timestamp.



371
372
373
# File 'lib/contacts/windowslivelogin.rb', line 371

def timestamp
  @timestamp
end

#tokenObject

Returns the value of attribute token.



371
372
373
# File 'lib/contacts/windowslivelogin.rb', line 371

def token
  @token
end

Instance Method Details

#usePersistentCookie?Boolean

Returns:

  • (Boolean)


373
374
375
# File 'lib/contacts/windowslivelogin.rb', line 373

def usePersistentCookie?
  @usePersistentCookie
end