class

Authly::InMemoryStore

Inherits Enumerable < Authly::TokenStore < Reference < Object

Constructors

new

Use a set to track revoked tokens by their jti

Source

Instance methods

consume(token_id : String) : Bool

Revoke token_id and report whether this call was the one that revoked it, so a one-time credential can be redeemed by exactly one of several concurrent requests. The default is check-then-revoke; a shared store should override it with an atomic operation (for Redis, SET NX).

Source
each

Implement the each method to make the class enumerable

Source
fetch(token_id : String)
Source
revoke(token_id : String)

Method to revoke a token by its jti

Source
revoked?(token_id : String) : Bool

Method to check if a token's jti has been revoked

Source
store(token_id : String, payload)

Method to store a token by its jti

Source
valid?(token_id : String) : Bool
Source

Nested types