Class: WorkOS::AuthenticateResponse
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::AuthenticateResponse
- Defined in:
- lib/workos/user_management/authenticate_response.rb
Constant Summary collapse
- HASH_ATTRS =
{ user: :user, organization_id: :organization_id, authkit_authorization_code: :authkit_authorization_code, access_token: :access_token, refresh_token: :refresh_token, authentication_method: :authentication_method, impersonator: :impersonator, oauth_tokens: :oauth_tokens }.freeze
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#authentication_method ⇒ Object
Returns the value of attribute authentication_method.
-
#authkit_authorization_code ⇒ Object
Returns the value of attribute authkit_authorization_code.
-
#impersonator ⇒ Object
Returns the value of attribute impersonator.
-
#oauth_tokens ⇒ Object
Returns the value of attribute oauth_tokens.
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
-
#user ⇒ Object
Returns the value of attribute user.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ AuthenticateResponse
constructor
A new instance of AuthenticateResponse.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ AuthenticateResponse
Returns a new instance of AuthenticateResponse.
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/workos/user_management/authenticate_response.rb', line 28 def initialize(json) hash = self.class.normalize(json) @user = hash[:user] ? WorkOS::User.new(hash[:user]) : nil @organization_id = hash[:organization_id] @authkit_authorization_code = hash[:authkit_authorization_code] @access_token = hash[:access_token] @refresh_token = hash[:refresh_token] @authentication_method = hash[:authentication_method] @impersonator = hash[:impersonator] ? WorkOS::AuthenticateResponseImpersonator.new(hash[:impersonator]) : nil @oauth_tokens = hash[:oauth_tokens] ? WorkOS::AuthenticateResponseOAuthToken.new(hash[:oauth_tokens]) : nil end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
18 19 20 |
# File 'lib/workos/user_management/authenticate_response.rb', line 18 def access_token @access_token end |
#authentication_method ⇒ Object
Returns the value of attribute authentication_method.
18 19 20 |
# File 'lib/workos/user_management/authenticate_response.rb', line 18 def authentication_method @authentication_method end |
#authkit_authorization_code ⇒ Object
Returns the value of attribute authkit_authorization_code.
18 19 20 |
# File 'lib/workos/user_management/authenticate_response.rb', line 18 def @authkit_authorization_code end |
#impersonator ⇒ Object
Returns the value of attribute impersonator.
18 19 20 |
# File 'lib/workos/user_management/authenticate_response.rb', line 18 def impersonator @impersonator end |
#oauth_tokens ⇒ Object
Returns the value of attribute oauth_tokens.
18 19 20 |
# File 'lib/workos/user_management/authenticate_response.rb', line 18 def oauth_tokens @oauth_tokens end |
#organization_id ⇒ Object
Returns the value of attribute organization_id.
18 19 20 |
# File 'lib/workos/user_management/authenticate_response.rb', line 18 def organization_id @organization_id end |
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
18 19 20 |
# File 'lib/workos/user_management/authenticate_response.rb', line 18 def refresh_token @refresh_token end |
#user ⇒ Object
Returns the value of attribute user.
18 19 20 |
# File 'lib/workos/user_management/authenticate_response.rb', line 18 def user @user end |