Class: SimpleJwtAuth::Middleware::Grape::Authorisation
- Inherits:
-
Grape::Middleware::Base
- Object
- Grape::Middleware::Base
- SimpleJwtAuth::Middleware::Grape::Authorisation
- Defined in:
- lib/simple_jwt_auth/middleware/grape/authorisation.rb
Instance Method Summary collapse
- #before ⇒ Object
-
#initialize(app, options = nil) ⇒ Authorisation
constructor
A new instance of Authorisation.
Constructor Details
#initialize(app, options = nil) ⇒ Authorisation
Returns a new instance of Authorisation.
7 8 9 |
# File 'lib/simple_jwt_auth/middleware/grape/authorisation.rb', line 7 def initialize(app, = nil) super(app, **( || {})) end |
Instance Method Details
#before ⇒ Object
11 12 13 14 15 16 |
# File 'lib/simple_jwt_auth/middleware/grape/authorisation.rb', line 11 def before return if test_env? || raise SimpleJwtAuth::Errors::Forbidden, "access to endpoint forbidden for issuer `#{current_issuer}`" end |