Trait oxide_auth::endpoint::WebResponse[][src]

pub trait WebResponse {
    type Error;
    fn ok(&mut self) -> Result<(), Self::Error>;
fn redirect(&mut self, url: Url) -> Result<(), Self::Error>;
fn client_error(&mut self) -> Result<(), Self::Error>;
fn unauthorized(&mut self, header_value: &str) -> Result<(), Self::Error>;
fn body_text(&mut self, text: &str) -> Result<(), Self::Error>;
fn body_json(&mut self, data: &str) -> Result<(), Self::Error>; }
Expand description

Response representation into which the Request is transformed by the code_grant types.

At most one of the methods body_text, body_json will be called. Some flows will however not call any of those methods.

Associated Types

The error generated when trying to construct an unhandled or invalid response.

Required methods

Set the response status to 200.

A response which will redirect the user-agent to which the response is issued.

Set the response status to 400.

Set the response status to 401 and add a WWW-Authenticate header.

A pure text response with no special media type set.

Json repsonse data, with media type `aplication/json.

Implementors