Trait Request

Source
pub trait Request {
    // Required methods
    fn valid(&self) -> bool;
    fn refresh_token(&self) -> Option<Cow<'_, str>>;
    fn scope(&self) -> Option<Cow<'_, str>>;
    fn grant_type(&self) -> Option<Cow<'_, str>>;
    fn authorization(&self) -> Option<(Cow<'_, str>, Cow<'_, [u8]>)>;
    fn extension(&self, key: &str) -> Option<Cow<'_, str>>;
}
Expand description

Required content of a refresh request.

See Refreshing an Access Token in the rfc.

Required Methods§

Source

fn valid(&self) -> bool

Received request might not be encoded correctly. This method gives implementors the chance to signal that a request was received but its encoding was generally malformed. If this is the case, then no other attribute will be queried. This method exists mainly to make frontends straightforward by not having them handle special cases for malformed requests.

Source

fn refresh_token(&self) -> Option<Cow<'_, str>>

The refresh token with which to refresh.

Source

fn scope(&self) -> Option<Cow<'_, str>>

Optionally specifies the requested scope

Source

fn grant_type(&self) -> Option<Cow<'_, str>>

Valid requests have this set to “refresh_token”

Source

fn authorization(&self) -> Option<(Cow<'_, str>, Cow<'_, [u8]>)>

User:password of a basic authorization header.

Source

fn extension(&self, key: &str) -> Option<Cow<'_, str>>

Retrieve an additional parameter used in an extension

Implementors§