pub trait Request {
// Required methods
fn valid(&self) -> bool;
fn client_id(&self) -> Option<Cow<'_, str>>;
fn scope(&self) -> Option<Cow<'_, str>>;
fn redirect_uri(&self) -> Option<Cow<'_, str>>;
fn state(&self) -> Option<Cow<'_, str>>;
fn response_type(&self) -> Option<Cow<'_, str>>;
fn extension(&self, key: &str) -> Option<Cow<'_, str>>;
}
Expand description
Interface required from a request to determine the handling in the backend.
Required Methods§
Sourcefn valid(&self) -> bool
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.
Sourcefn client_id(&self) -> Option<Cow<'_, str>>
fn client_id(&self) -> Option<Cow<'_, str>>
Identity of the client trying to gain an oauth token.
Sourcefn redirect_uri(&self) -> Option<Cow<'_, str>>
fn redirect_uri(&self) -> Option<Cow<'_, str>>
Valid request have (one of) the registered redirect urls for this client.
Sourcefn state(&self) -> Option<Cow<'_, str>>
fn state(&self) -> Option<Cow<'_, str>>
Optional parameter the client can use to identify the redirected user-agent.
Sourcefn response_type(&self) -> Option<Cow<'_, str>>
fn response_type(&self) -> Option<Cow<'_, str>>
The method requested, valid requests MUST return code