Class: AuthenticJwt::Grape::Middleware
- Inherits:
-
Grape::Middleware::Base
- Object
- Grape::Middleware::Base
- AuthenticJwt::Grape::Middleware
- Defined in:
- lib/authentic_jwt/grape/middleware.rb
Instance Method Summary collapse
Instance Method Details
#before ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/authentic_jwt/grape/middleware.rb', line 7 def before return unless scope validator = AuthenticJwt::Validator.new payload = validator.call(header: header) = AuthenticJwt::Authorizer.new .call(payload: payload, scope: scope) context.extend(AuthMethods) context.jwt_payload = payload end |