class Warden::JWTAuth::TokenDecoder
Decodes a JWT into a hash payload into a JWT token
Public Instance Methods
call(token)
click to toggle source
Decodes the payload from a JWT as a hash
@see JWT.decode for all the exceptions than can be raised when given token is invalid
@param token [String] a JWT @return [Hash] payload decoded from the JWT
# 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