Class: MaticJWT::Grape::Middleware::Request
- Inherits:
-
Object
- Object
- MaticJWT::Grape::Middleware::Request
- Defined in:
- lib/matic-jwt/grape/middleware/request.rb
Constant Summary collapse
- AUTHORIZATION_KEYS =
%w[ Authorization HTTP_AUTHORIZATION X-HTTP_AUTHORIZATION X_HTTP_AUTHORIZATION ].freeze
Instance Method Summary collapse
- #auth_token ⇒ Object
-
#initialize(env) ⇒ Request
constructor
A new instance of Request.
- #valid? ⇒ Boolean
Constructor Details
#initialize(env) ⇒ Request
Returns a new instance of Request.
14 15 16 |
# File 'lib/matic-jwt/grape/middleware/request.rb', line 14 def initialize(env) @env = env end |
Instance Method Details
#auth_token ⇒ Object
22 23 24 |
# File 'lib/matic-jwt/grape/middleware/request.rb', line 22 def auth_token @env[auth_key] end |
#valid? ⇒ Boolean
18 19 20 |
# File 'lib/matic-jwt/grape/middleware/request.rb', line 18 def valid? !@env[auth_key].nil? end |