Class: OmniAuth::Jwt::Parser
- Inherits:
-
Object
- Object
- OmniAuth::Jwt::Parser
- Defined in:
- lib/omniauth/jwt/parser.rb
Constant Summary collapse
- DEFAULT_ALG =
'RS256'
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token, client:) ⇒ Parser
constructor
A new instance of Parser.
- #validated_payload ⇒ Object
Constructor Details
#initialize(token, client:) ⇒ Parser
Returns a new instance of Parser.
9 10 11 12 |
# File 'lib/omniauth/jwt/parser.rb', line 9 def initialize(token, client:) @token = token @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
7 8 9 |
# File 'lib/omniauth/jwt/parser.rb', line 7 def client @client end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
7 8 9 |
# File 'lib/omniauth/jwt/parser.rb', line 7 def token @token end |
Instance Method Details
#validated_payload ⇒ Object
14 15 16 |
# File 'lib/omniauth/jwt/parser.rb', line 14 def validated_payload ::JWT.decode(token, nil, true, jwks: jwks, algorithms: algorithms).first end |