Class: Warden::JWTAuth::TokenDecoder
- Inherits:
-
Object
- Object
- Warden::JWTAuth::TokenDecoder
- Defined in:
- lib/warden/jwt_auth/token_decoder.rb
Overview
Decodes a JWT into a hash payload into a JWT token
Instance Method Summary collapse
-
#call(token) ⇒ Hash
Decodes the payload from a JWT as a hash.
Instance Method Details
#call(token) ⇒ Hash
Decodes the payload from a JWT as a hash
token is invalid
16 17 18 19 20 21 22 |
# File 'lib/warden/jwt_auth/token_decoder.rb', line 16 def call(token) JWT.decode(token, secret, true, algorithm: algorithm, verify_jti: true)[0] end |