Exception: RackJwtVerifier::InsufficientScopeError
- Defined in:
- lib/rack_jwt_verifier/errors.rb
Overview
Handed to the :on_error hook when a token lacks a scope listed in require_scopes. Carries what was required and what was missing.
Instance Attribute Summary collapse
-
#missing ⇒ Object
readonly
Returns the value of attribute missing.
-
#required ⇒ Object
readonly
Returns the value of attribute required.
Instance Method Summary collapse
-
#initialize(required:, missing:) ⇒ InsufficientScopeError
constructor
A new instance of InsufficientScopeError.
Constructor Details
#initialize(required:, missing:) ⇒ InsufficientScopeError
34 35 36 37 38 |
# File 'lib/rack_jwt_verifier/errors.rb', line 34 def initialize(required:, missing:) @required = required @missing = missing super("Token lacks required scope(s): #{missing.join(' ')}") end |
Instance Attribute Details
#missing ⇒ Object (readonly)
Returns the value of attribute missing.
32 33 34 |
# File 'lib/rack_jwt_verifier/errors.rb', line 32 def missing @missing end |
#required ⇒ Object (readonly)
Returns the value of attribute required.
32 33 34 |
# File 'lib/rack_jwt_verifier/errors.rb', line 32 def required @required end |