[][src]Trait oxide_auth::primitives::issuer::Issuer

pub trait Issuer {
    fn issue(&mut self, grant: Grant) -> Result<IssuedToken, ()>;
fn refresh(
        &mut self,
        _refresh: &str,
        _grant: Grant
    ) -> Result<RefreshedToken, ()>;
fn recover_token<'a>(&'a self, _: &'a str) -> Result<Option<Grant>, ()>;
fn recover_refresh<'a>(&'a self, _: &'a str) -> Result<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: Grant) -> Result<IssuedToken, ()>

Create a token authorizing the request parameters

fn refresh(
    &mut self,
    _refresh: &str,
    _grant: Grant
) -> Result<RefreshedToken, ()>

Refresh a token.

fn recover_token<'a>(&'a self, _: &'a str) -> Result<Option<Grant>, ()>

Get the values corresponding to a bearer token

fn recover_refresh<'a>(&'a self, _: &'a str) -> Result<Option<Grant>, ()>

Get the values corresponding to a refresh token

Loading content...

Implementations on Foreign Types

impl<'s, I: Issuer + ?Sized> Issuer for &'s mut I[src]

impl<I: Issuer + ?Sized> Issuer for Box<I>[src]

impl<'s, I: Issuer + ?Sized> Issuer for MutexGuard<'s, I>[src]

impl<'s, I: Issuer + ?Sized> Issuer for RwLockWriteGuard<'s, I>[src]

Loading content...

Implementors

impl Issuer for TokenSigner[src]

impl<'a> Issuer for &'a TokenSigner[src]

impl<G: TagGrant> Issuer for TokenMap<G>[src]

Loading content...