Class: SimpleJwtAuth::Decode
- Inherits:
-
Object
- Object
- SimpleJwtAuth::Decode
- Includes:
- Traits::Configurable
- Defined in:
- lib/simple_jwt_auth/decode.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(token, options = {}) ⇒ Decode
constructor
A new instance of Decode.
Constructor Details
#initialize(token, options = {}) ⇒ Decode
Returns a new instance of Decode.
7 8 9 10 |
# File 'lib/simple_jwt_auth/decode.rb', line 7 def initialize(token, = {}) @token = token = end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/simple_jwt_auth/decode.rb', line 12 def call JWT.decode(token, nil, true, ) do |_headers, payload| issuer = payload['iss'] config.logger.debug "Decoding JWT token from issuer: #{issuer}" secrets.secret_for(issuer) end end |