[−][src]Trait oxide_auth::endpoint::WebResponse
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
type Error
The error generated when trying to construct an unhandled or invalid response.
Required methods
fn ok(&mut self) -> Result<(), Self::Error>
Set the response status to 200.
fn redirect(&mut self, url: Url) -> Result<(), Self::Error>
A response which will redirect the user-agent to which the response is issued.
fn client_error(&mut self) -> Result<(), Self::Error>
Set the response status to 400.
fn unauthorized(&mut self, header_value: &str) -> Result<(), Self::Error>
Set the response status to 401 and add a WWW-Authenticate header.
fn body_text(&mut self, text: &str) -> Result<(), Self::Error>
A pure text response with no special media type set.
fn body_json(&mut self, data: &str) -> Result<(), Self::Error>
Json repsonse data, with media type `aplication/json.
Implementations on Foreign Types
impl WebResponse for Response[src]
type Error = Error
fn ok(&mut self) -> Result<(), Self::Error>[src]
fn redirect(&mut self, url: Url) -> Result<(), Self::Error>[src]
fn client_error(&mut self) -> Result<(), Self::Error>[src]
fn unauthorized(&mut self, header_value: &str) -> Result<(), Self::Error>[src]
fn body_text(&mut self, text: &str) -> Result<(), Self::Error>[src]
fn body_json(&mut self, data: &str) -> Result<(), Self::Error>[src]
impl WebResponse for Response[src]
type Error = WebError
fn ok(&mut self) -> Result<(), Self::Error>[src]
fn redirect(&mut self, url: Url) -> Result<(), Self::Error>[src]
fn client_error(&mut self) -> Result<(), Self::Error>[src]
fn unauthorized(&mut self, kind: &str) -> Result<(), Self::Error>[src]
fn body_text(&mut self, text: &str) -> Result<(), Self::Error>[src]
fn body_json(&mut self, data: &str) -> Result<(), Self::Error>[src]
impl<'r> WebResponse for Response<'r>[src]
type Error = WebError
fn ok(&mut self) -> Result<(), Self::Error>[src]
fn redirect(&mut self, url: Url) -> Result<(), Self::Error>[src]
fn client_error(&mut self) -> Result<(), Self::Error>[src]
fn unauthorized(&mut self, kind: &str) -> Result<(), Self::Error>[src]
fn body_text(&mut self, text: &str) -> Result<(), Self::Error>[src]
fn body_json(&mut self, data: &str) -> Result<(), Self::Error>[src]
Implementors
impl WebResponse for OAuthResponse[src]
type Error = OAuthError
fn ok(&mut self) -> Result<(), Self::Error>[src]
fn redirect(&mut self, url: Url) -> Result<(), Self::Error>[src]
fn client_error(&mut self) -> Result<(), Self::Error>[src]
fn unauthorized(&mut self, kind: &str) -> Result<(), Self::Error>[src]
fn body_text(&mut self, text: &str) -> Result<(), Self::Error>[src]
fn body_json(&mut self, data: &str) -> Result<(), Self::Error>[src]
impl WebResponse for oxide_auth::frontends::simple::request::Response[src]
type Error = NoError
fn ok(&mut self) -> Result<(), Self::Error>[src]
fn redirect(&mut self, url: Url) -> Result<(), Self::Error>[src]
A response which will redirect the user-agent to which the response is issued.
fn client_error(&mut self) -> Result<(), Self::Error>[src]
Set the response status to 400.
fn unauthorized(&mut self, header_value: &str) -> Result<(), Self::Error>[src]
Set the response status to 401 and add a WWW-Authenticate header.
fn body_text(&mut self, text: &str) -> Result<(), Self::Error>[src]
A pure text response with no special media type set.
fn body_json(&mut self, data: &str) -> Result<(), Self::Error>[src]
Json repsonse data, with media type `aplication/json.
impl<W: WebResponse, F, T> WebResponse for MapErr<W, F, T> where
F: FnMut(W::Error) -> T, [src]
F: FnMut(W::Error) -> T,
type Error = T
fn ok(&mut self) -> Result<(), Self::Error>[src]
fn redirect(&mut self, url: Url) -> Result<(), Self::Error>[src]
A response which will redirect the user-agent to which the response is issued.
fn client_error(&mut self) -> Result<(), Self::Error>[src]
Set the response status to 400.
fn unauthorized(&mut self, header_value: &str) -> Result<(), Self::Error>[src]
Set the response status to 401 and add a WWW-Authenticate header.
fn body_text(&mut self, text: &str) -> Result<(), Self::Error>[src]
A pure text response with no special media type set.
fn body_json(&mut self, data: &str) -> Result<(), Self::Error>[src]
Json repsonse data, with media type `aplication/json.