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.
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).
Create a token authorizing the request parameters
Get the values corresponding to a bearer token
Get the values corresponding to a refresh token
Reference this mutably as an Issuer or Option::None.
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
impl<T> Typeable for T where T: Any, | |
Get the TypeId of this object.
impl<T> UnsafeAny for T where T: Any, | |
impl<T> IntoCollection for T | |
Converts self into a collection.
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where A: Array<Item = U>, F: FnMut(T) -> U, | |
impl<T, I> AsResult for T where I: Input, | |