Struct oxide_auth::primitives::issuer::TokenMap [−][src]
pub struct TokenMap<G: TagGrant = Box<dyn TagGrant + Send + Sync + 'static>> { /* fields omitted */ }Expand description
Keeps track of access and refresh tokens by a hash-map.
The generator is itself trait based and can be chosen during construction. It is assumed to not be possible (or at least very unlikely during their overlapping lifetime) for two different grants to generate the same token in the grant tagger.
Implementations
Set the validity of all issued grants to the specified duration.
All grants are valid for their default duration.
Unconditionally delete grant associated with the token.
This is the main advantage over signing tokens. By keeping internal state of allowed grants, the resource owner or other instances can revoke a token before it expires naturally. There is no differentiation between access and refresh tokens since these should have a marginal probability of colliding.
Directly associate token with grant.
No checks on the validity of the grant are performed but the expiration time of the grant
is modified (if a duration was previously set).
Trait Implementations
Create a token authorizing the request parameters
Refresh a token.
Get the values corresponding to a bearer token