[][src]Trait oxide_auth::primitives::authorizer::Authorizer

pub trait Authorizer {
    fn authorize(&mut self, _: Grant) -> Result<String, ()>;
fn extract(&mut self, token: &str) -> Result<Option<Grant>, ()>; }

Authorizers create and manage authorization codes.

The authorization code can be traded for a bearer token at the token endpoint.

Required methods

fn authorize(&mut self, _: Grant) -> Result<String, ()>

Create a code which allows retrieval of a bearer token at a later time.

fn extract(&mut self, token: &str) -> Result<Option<Grant>, ()>

Retrieve the parameters associated with a token, invalidating the code in the process. In particular, a code should not be usable twice (there is no stateless implementation of an authorizer for this reason).

Loading content...

Implementations on Foreign Types

impl<'a, A: Authorizer + ?Sized> Authorizer for &'a mut A[src]

impl<A: Authorizer + ?Sized> Authorizer for Box<A>[src]

impl<'a, A: Authorizer + ?Sized> Authorizer for MutexGuard<'a, A>[src]

impl<'a, A: Authorizer + ?Sized> Authorizer for RwLockWriteGuard<'a, A>[src]

Loading content...

Implementors

impl<I: TagGrant> Authorizer for AuthMap<I>[src]

Loading content...