class Auth0RS256JWTVerifier::JWTDecoder::DecodedJWT

Public Class Methods

new(jwt) click to toggle source
# File lib/auth0_rs256_jwt_verifier/jwt_decoder.rb, line 20
def initialize(jwt)
  @jwt = jwt
end

Public Instance Methods

[](k) click to toggle source
# File lib/auth0_rs256_jwt_verifier/jwt_decoder.rb, line 24
def [](k)
  case k
  when :alg then @jwt.alg
  when :kid then @jwt.header[:kid]
  else @jwt[k]
  end
end
key?(k) click to toggle source
# File lib/auth0_rs256_jwt_verifier/jwt_decoder.rb, line 32
def key?(k)
  ![k].nil?
end