[][src]Trait aliri::Authority

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; }

An authority that can verify the validity of a token

Associated Types

type Policy: Policy

Policy for the authority

type Token

The token type expected by the authority

type VerifyFuture: Future<Output = Result<Payload, Self::VerifyError>> + 'a

The future type returned by the asynchronous verification function

type VerifyError

The type returned in the event of a verification failure

Loading content...

Required methods

fn verify(&'a self, token: Self::Token, dir: Self::Policy) -> Self::VerifyFuture

Asynchronously verifies a token using the provided directive

Loading content...

Implementors

Loading content...