Class: RackJWTDecode
- Inherits:
-
Object
- Object
- RackJWTDecode
- Defined in:
- lib/rack_jwt_decode.rb
Constant Summary collapse
- HTTP_AUTHORIZATION =
"HTTP_AUTHORIZATION".freeze
- BEARER_REGEXP =
/\ABearer /i.freeze
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, application_secret) ⇒ RackJWTDecode
constructor
A new instance of RackJWTDecode.
Constructor Details
#initialize(app, application_secret) ⇒ RackJWTDecode
Returns a new instance of RackJWTDecode.
7 8 9 10 |
# File 'lib/rack_jwt_decode.rb', line 7 def initialize(app, application_secret) @app = app @application_secret = application_secret end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 |
# File 'lib/rack_jwt_decode.rb', line 12 def call(env) add_jwt_payload_to_env(env) @app.call(env) end |