Class: KeycloakAdmin::TokenRepresentation
- Inherits:
-
Representation
- Object
- Representation
- KeycloakAdmin::TokenRepresentation
- Defined in:
- lib/keycloak-admin/representation/token_representation.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#expires_in ⇒ Object
Returns the value of attribute expires_in.
-
#id_token ⇒ Object
Returns the value of attribute id_token.
-
#not_before_policy ⇒ Object
Returns the value of attribute not_before_policy.
-
#refresh_expires_in ⇒ Object
Returns the value of attribute refresh_expires_in.
-
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
-
#session_state ⇒ Object
Returns the value of attribute session_state.
-
#token_type ⇒ Object
Returns the value of attribute token_type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(access_token, token_type, expires_in, refresh_token, refresh_expires_in, id_token, not_before_policy, session_state) ⇒ TokenRepresentation
constructor
A new instance of TokenRepresentation.
Methods inherited from Representation
Methods included from CamelJson
Constructor Details
#initialize(access_token, token_type, expires_in, refresh_token, refresh_expires_in, id_token, not_before_policy, session_state) ⇒ TokenRepresentation
Returns a new instance of TokenRepresentation.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/keycloak-admin/representation/token_representation.rb', line 13 def initialize(access_token, token_type, expires_in, refresh_token, refresh_expires_in, id_token, not_before_policy, session_state) @access_token = access_token @token_type = token_type @expires_in = expires_in @refresh_token = refresh_token @refresh_expires_in = refresh_expires_in @id_token = id_token @not_before_policy = not_before_policy @session_state = session_state end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
4 5 6 |
# File 'lib/keycloak-admin/representation/token_representation.rb', line 4 def access_token @access_token end |
#expires_in ⇒ Object
Returns the value of attribute expires_in.
4 5 6 |
# File 'lib/keycloak-admin/representation/token_representation.rb', line 4 def expires_in @expires_in end |
#id_token ⇒ Object
Returns the value of attribute id_token.
4 5 6 |
# File 'lib/keycloak-admin/representation/token_representation.rb', line 4 def id_token @id_token end |
#not_before_policy ⇒ Object
Returns the value of attribute not_before_policy.
4 5 6 |
# File 'lib/keycloak-admin/representation/token_representation.rb', line 4 def not_before_policy @not_before_policy end |
#refresh_expires_in ⇒ Object
Returns the value of attribute refresh_expires_in.
4 5 6 |
# File 'lib/keycloak-admin/representation/token_representation.rb', line 4 def refresh_expires_in @refresh_expires_in end |
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
4 5 6 |
# File 'lib/keycloak-admin/representation/token_representation.rb', line 4 def refresh_token @refresh_token end |
#session_state ⇒ Object
Returns the value of attribute session_state.
4 5 6 |
# File 'lib/keycloak-admin/representation/token_representation.rb', line 4 def session_state @session_state end |
#token_type ⇒ Object
Returns the value of attribute token_type.
4 5 6 |
# File 'lib/keycloak-admin/representation/token_representation.rb', line 4 def token_type @token_type end |
Class Method Details
.from_hash(hash) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/keycloak-admin/representation/token_representation.rb', line 24 def self.from_hash(hash) new( hash["access_token"], hash["token_type"], hash["expires_in"], hash["refresh_token"], hash["refresh_expires_in"], hash["id_token"], hash["not-before-policy"], hash["session_state"], ) end |