Class: MaticJWT::Grape::Middleware::Auth
- Inherits:
-
Object
- Object
- MaticJWT::Grape::Middleware::Auth
- Defined in:
- lib/matic-jwt/grape/middleware/auth.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, options) ⇒ Auth
constructor
A new instance of Auth.
Constructor Details
#initialize(app, options) ⇒ Auth
Returns a new instance of Auth.
5 6 7 8 |
# File 'lib/matic-jwt/grape/middleware/auth.rb', line 5 def initialize(app, ) @app = app @secret_reader = [:secret] end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/matic-jwt/grape/middleware/auth.rb', line 10 def call(env) @env = env validate_request decode_payload authenticate! continue! end |