Trait Request

Source
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§

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 client_id(&self) -> Option<Cow<'_, str>>

Identity of the client trying to gain an oauth token.

Source

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

Optionally specifies the requested scope

Source

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

Valid request have (one of) the registered redirect urls for this client.

Source

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

Optional parameter the client can use to identify the redirected user-agent.

Source

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

The method requested, valid requests MUST return code

Source

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

Retrieve an additional parameter used in an extension

Implementors§