Class: WorkOS::RefreshAuthenticationResponse
- Inherits:
-
Object
- Object
- WorkOS::RefreshAuthenticationResponse
- Includes:
- HashProvider
- Defined in:
- lib/workos/refresh_authentication_response.rb
Overview
The RefreshAuthenticationResponse contains response data from a successful UserManagement.authenticate_with_refresh_token call
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
Instance Method Summary collapse
-
#initialize(authentication_response_json) ⇒ RefreshAuthenticationResponse
constructor
A new instance of RefreshAuthenticationResponse.
- #to_json ⇒ Object
Methods included from HashProvider
Constructor Details
#initialize(authentication_response_json) ⇒ RefreshAuthenticationResponse
Returns a new instance of RefreshAuthenticationResponse.
11 12 13 14 15 |
# File 'lib/workos/refresh_authentication_response.rb', line 11 def initialize(authentication_response_json) json = JSON.parse(authentication_response_json, symbolize_names: true) @access_token = json[:access_token] @refresh_token = json[:refresh_token] end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
9 10 11 |
# File 'lib/workos/refresh_authentication_response.rb', line 9 def access_token @access_token end |
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
9 10 11 |
# File 'lib/workos/refresh_authentication_response.rb', line 9 def refresh_token @refresh_token end |
Instance Method Details
#to_json ⇒ Object
17 18 19 20 21 22 |
# File 'lib/workos/refresh_authentication_response.rb', line 17 def to_json(*) { access_token: access_token, refresh_token: refresh_token, } end |