Trait oxide_auth::code_grant::backend::AccessTokenRequest
[−]
[src]
pub trait AccessTokenRequest { fn valid(&self) -> bool; fn code(&self) -> Option<Cow<str>>; fn authorization(&self) -> Option<(Cow<str>, Cow<[u8]>)>; fn client_id(&self) -> Option<Cow<str>>; fn redirect_uri(&self) -> Option<Cow<str>>; fn grant_type(&self) -> Option<Cow<str>>; fn extension(&self, _: &str) -> Option<Cow<str>>; }
Trait based retrieval of parameters necessary for access token request handling.
Required Methods
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.
fn code(&self) -> Option<Cow<str>>
The authorization code grant for which an access token is wanted.
User:password of a basic authorization header.
fn client_id(&self) -> Option<Cow<str>>
The client_id, optional parameter for public clients.
fn redirect_uri(&self) -> Option<Cow<str>>
Valid request have the redirect url used to request the authorization code grant.
fn grant_type(&self) -> Option<Cow<str>>
Valid requests have this set to "authorization_code"
fn extension(&self, _: &str) -> Option<Cow<str>>
Retrieve an additional parameter used in an extension