Trait oxide_auth::primitives::issuer::Issuer
[−]
[src]
pub trait Issuer { fn issue(&mut self, _: Grant) -> Result<IssuedToken, ()>; fn recover_token<'a>(&'a self, _: &'a str) -> Option<Grant>; fn recover_refresh<'a>(&'a self, _: &'a str) -> Option<Grant>; }
Issuers create bearer tokens.
It's the issuers decision whether a refresh token is offered or not. In any case, it is also responsible for determining the validity and parameters of any possible token string. Some backends or frontends may decide not to propagate the refresh token (for example because they do not intend to offer a statefull refresh api).
Required Methods
fn issue(&mut self, _: Grant) -> Result<IssuedToken, ()>
Create a token authorizing the request parameters
fn recover_token<'a>(&'a self, _: &'a str) -> Option<Grant>
Get the values corresponding to a bearer token
fn recover_refresh<'a>(&'a self, _: &'a str) -> Option<Grant>
Get the values corresponding to a refresh token
Implementors
impl<G: TokenGenerator> Issuer for TokenMap<G>
impl Issuer for TokenSigner