Class: Doorkeeper::OAuth::IdTokenResponse
- Inherits:
-
BaseResponse
- Object
- BaseResponse
- Doorkeeper::OAuth::IdTokenResponse
- Includes:
- OAuth::Helpers
- Defined in:
- lib/doorkeeper/oauth/id_token_response.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#auth ⇒ Object
Returns the value of attribute auth.
-
#id_token ⇒ Object
Returns the value of attribute id_token.
-
#pre_auth ⇒ Object
Returns the value of attribute pre_auth.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(pre_auth, auth, id_token) ⇒ IdTokenResponse
constructor
A new instance of IdTokenResponse.
- #redirect_uri ⇒ Object
- #redirectable? ⇒ Boolean
Constructor Details
#initialize(pre_auth, auth, id_token) ⇒ IdTokenResponse
Returns a new instance of IdTokenResponse.
10 11 12 13 14 |
# File 'lib/doorkeeper/oauth/id_token_response.rb', line 10 def initialize(pre_auth, auth, id_token) @pre_auth = pre_auth @auth = auth @id_token = id_token end |
Instance Attribute Details
#auth ⇒ Object
Returns the value of attribute auth.
8 9 10 |
# File 'lib/doorkeeper/oauth/id_token_response.rb', line 8 def auth @auth end |
#id_token ⇒ Object
Returns the value of attribute id_token.
8 9 10 |
# File 'lib/doorkeeper/oauth/id_token_response.rb', line 8 def id_token @id_token end |
#pre_auth ⇒ Object
Returns the value of attribute pre_auth.
8 9 10 |
# File 'lib/doorkeeper/oauth/id_token_response.rb', line 8 def pre_auth @pre_auth end |
Instance Method Details
#body ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/doorkeeper/oauth/id_token_response.rb', line 20 def body { expires_in: auth.token.expires_in_seconds, state: pre_auth.state, id_token: id_token.as_jws_token } end |
#redirect_uri ⇒ Object
28 29 30 |
# File 'lib/doorkeeper/oauth/id_token_response.rb', line 28 def redirect_uri Authorization::URIBuilder.uri_with_fragment(pre_auth.redirect_uri, body) end |
#redirectable? ⇒ Boolean
16 17 18 |
# File 'lib/doorkeeper/oauth/id_token_response.rb', line 16 def redirectable? true end |