Class: OneLogin::Api::Models::SessionTokenInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/onelogin/api/models/session_token_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ SessionTokenInfo

Returns a new instance of SessionTokenInfo.


9
10
11
12
13
14
15
16
17
# File 'lib/onelogin/api/models/session_token_info.rb', line 9

def initialize(data)
  @status = data['status'].to_s
  unless data['user'].empty?
    @user = OneLogin::Api::Models::User.new(data['user']) # Partial info
  end
  @return_to_url = data['return_to_url'].to_s          
  @expires_at = Time.parse(data['expires_at'])
  @session_token = data['session_token'].to_s
end

Instance Attribute Details

#expires_atObject

Returns the value of attribute expires_at.


7
8
9
# File 'lib/onelogin/api/models/session_token_info.rb', line 7

def expires_at
  @expires_at
end

#return_to_urlObject

Returns the value of attribute return_to_url.


7
8
9
# File 'lib/onelogin/api/models/session_token_info.rb', line 7

def return_to_url
  @return_to_url
end

#session_tokenObject

Returns the value of attribute session_token.


7
8
9
# File 'lib/onelogin/api/models/session_token_info.rb', line 7

def session_token
  @session_token
end

#statusObject

Returns the value of attribute status.


7
8
9
# File 'lib/onelogin/api/models/session_token_info.rb', line 7

def status
  @status
end

#userObject

Returns the value of attribute user.


7
8
9
# File 'lib/onelogin/api/models/session_token_info.rb', line 7

def user
  @user
end