Class: WorkOS::AuthenticateResponseOAuthToken
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::AuthenticateResponseOAuthToken
- Defined in:
- lib/workos/user_management/authenticate_response_oauth_token.rb
Constant Summary collapse
- HASH_ATTRS =
{ provider: :provider, refresh_token: :refresh_token, access_token: :access_token, expires_at: :expires_at, scopes: :scopes }.freeze
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#expires_at ⇒ Object
Returns the value of attribute expires_at.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
-
#scopes ⇒ Object
Returns the value of attribute scopes.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ AuthenticateResponseOAuthToken
constructor
A new instance of AuthenticateResponseOAuthToken.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ AuthenticateResponseOAuthToken
Returns a new instance of AuthenticateResponseOAuthToken.
22 23 24 25 26 27 28 29 |
# File 'lib/workos/user_management/authenticate_response_oauth_token.rb', line 22 def initialize(json) hash = self.class.normalize(json) @provider = hash[:provider] @refresh_token = hash[:refresh_token] @access_token = hash[:access_token] @expires_at = hash[:expires_at] @scopes = hash[:scopes] || [] end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
15 16 17 |
# File 'lib/workos/user_management/authenticate_response_oauth_token.rb', line 15 def access_token @access_token end |
#expires_at ⇒ Object
Returns the value of attribute expires_at.
15 16 17 |
# File 'lib/workos/user_management/authenticate_response_oauth_token.rb', line 15 def expires_at @expires_at end |
#provider ⇒ Object
Returns the value of attribute provider.
15 16 17 |
# File 'lib/workos/user_management/authenticate_response_oauth_token.rb', line 15 def provider @provider end |
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
15 16 17 |
# File 'lib/workos/user_management/authenticate_response_oauth_token.rb', line 15 def refresh_token @refresh_token end |
#scopes ⇒ Object
Returns the value of attribute scopes.
15 16 17 |
# File 'lib/workos/user_management/authenticate_response_oauth_token.rb', line 15 def scopes @scopes end |