Class: Warden::JWTAuth::Hooks
- Inherits:
-
Object
- Object
- Warden::JWTAuth::Hooks
- Defined in:
- lib/warden/jwt_auth/hooks.rb
Overview
Warden hooks
Constant Summary collapse
- PREPARED_TOKEN_ENV_KEY =
‘env` key where JWT is added
'warden-jwt_auth.token'
Class Method Summary collapse
-
.after_set_user(user, auth, opts) ⇒ Object
Adds a token for the signed in user to the request ‘env` if current path and verb match with configuration.
Class Method Details
.after_set_user(user, auth, opts) ⇒ Object
Adds a token for the signed in user to the request ‘env` if current path and verb match with configuration. This will be picked up later on by a rack middleware which will add it to the response headers.
17 18 19 |
# File 'lib/warden/jwt_auth/hooks.rb', line 17 def self.after_set_user(user, auth, opts) new.send(:prepare_token, user, auth, opts) end |