pub trait WebResponse {
type Error;
// Required methods
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.
Required Associated Types§
Required Methods§
Sourcefn redirect(&mut self, url: Url) -> Result<(), Self::Error>
fn redirect(&mut self, url: Url) -> Result<(), Self::Error>
A response which will redirect the user-agent to which the response is issued.
Sourcefn client_error(&mut self) -> Result<(), Self::Error>
fn client_error(&mut self) -> Result<(), Self::Error>
Set the response status to 400.
Set the response status to 401 and add a WWW-Authenticate header.