Trait oxide_auth::primitives::authorizer::Authorizer
[−]
[src]
pub trait Authorizer { fn authorize(&mut self, _: Grant) -> Result<String, ()>; fn extract(&mut self, _: &str) -> Option<Grant>; }
Authorizers create and manage authorization codes.
The authorization code can be traded for a bearer token at the token endpoint.
Required Methods
Create a code which allows retrieval of a bearer token at a later time.
fn extract(&mut self, _: &str) -> 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).
Implementors
impl<I: TokenGenerator> Authorizer for Storage<I>