Class: Faraday::JWT::Response
- Inherits:
-
Middleware
- Object
- Middleware
- Faraday::JWT::Response
- Defined in:
- lib/faraday/jwt/response.rb
Instance Method Summary collapse
-
#initialize(app = nil, verification_key: :skip_verification, signing_algs: nil, content_type: 'application/jwt') ⇒ Response
constructor
A new instance of Response.
- #on_complete(env) ⇒ Object
Constructor Details
#initialize(app = nil, verification_key: :skip_verification, signing_algs: nil, content_type: 'application/jwt') ⇒ Response
Returns a new instance of Response.
6 7 8 9 10 11 |
# File 'lib/faraday/jwt/response.rb', line 6 def initialize(app = nil, verification_key: :skip_verification, signing_algs: nil, content_type: 'application/jwt') super app @verification_key = verification_key @signing_algs = signing_algs @content_types = Array(content_type) end |
Instance Method Details
#on_complete(env) ⇒ Object
13 14 15 |
# File 'lib/faraday/jwt/response.rb', line 13 def on_complete(env) decode_body!(env) if decodable_content?(env) end |