You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invalidate tokens. Expire Tokens. And config options. (#7)
* Adding the ability to revoke tokens
We keep track of a set of "revoke_tokens", which are stored in the DB, and also in the JWT token.
If the revoke token is removed from the DB, and a user tries to use the corrosponding JWT token, then the request will be denied.
Also adding messages to a lot of exceptions.
* Add some docs
* Switching to a single verifier token
* Rename revokable to revocable
* Renaming to Tokenable::Verifier
* Much cleaner way to check if Verifier is included
* Adding support for Expiring Tokens + Tokenable config (#8)
* Adding support for expiring tokens
This is optional, and if the config setting (yet to be built) is set to nil, then the tokens will never expire
* Adding config options for lifespan, and secret
* No need to catch here, as we catch this exception in `current_user`
* We want to call jwt_user_id first, so that the root exception is bubbled up
* Catching and throwing more specific JWT errors
* Some docs on Config options, and also document that user_id is returned
* Specific section on token expiry
* Change docs order a bit
* Moving to a Config class so we can easily test, and also add a nicer way to access Proc's
* Bit nicer way to get proc_reader when needed
* Use from_tokenable_params instead of from_params
* Use string instead of uuid
* Fix this
* Some docs
0 commit comments