Trait aliri_traits::Authority [−][src]
pub trait Authority<'a, Payload> { type Policy: Policy; type Token; type VerifyFuture: Future<Output = Result<Payload, Self::VerifyError>> + 'a; type VerifyError; fn verify(
&'a self,
token: Self::Token,
dir: Self::Policy
) -> Self::VerifyFuture; }
Expand description
An authority that can verify the validity of a token
Associated Types
type Policy: Policy
[src]
Expand description
Policy for the authority
type Token
[src]
Expand description
The token type expected by the authority
type VerifyFuture: Future<Output = Result<Payload, Self::VerifyError>> + 'a
[src]
Expand description
The future type returned by the asynchronous verification function
type VerifyError
[src]
Expand description
The type returned in the event of a verification failure
Required methods
fn verify(&'a self, token: Self::Token, dir: Self::Policy) -> Self::VerifyFuture
[src]
Expand description
Asynchronously verifies a token using the provided directive