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

Construct a TokenMap from the given generator.

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

Get the values corresponding to a refresh token

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Reference this mutably as an Issuer or Option::None.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.