Trait oxide_auth::code_grant::frontend::WebResponse
[−]
[src]
pub trait WebResponse where
Self: Sized, { fn redirect(url: Url) -> Result<Self, OAuthError>; fn text(text: &str) -> Result<Self, OAuthError>; fn json(data: &str) -> Result<Self, OAuthError>; fn as_client_error(self) -> Result<Self, OAuthError>; fn as_unauthorized(self) -> Result<Self, OAuthError>; fn with_authorization(self, kind: &str) -> Result<Self, OAuthError>; fn redirect_error(target: ErrorUrl) -> Result<Self, OAuthError> { ... } }
Required Methods
fn redirect(url: Url) -> Result<Self, OAuthError>
fn text(text: &str) -> Result<Self, OAuthError>
fn json(data: &str) -> Result<Self, OAuthError>
fn as_client_error(self) -> Result<Self, OAuthError>
Set the response status to 400
Set the response status to 401
Add an Authorization header
Provided Methods
fn redirect_error(target: ErrorUrl) -> Result<Self, OAuthError>
Construct a redirect for the error. Here the response may choose to augment the error with additional information (such as help websites, description strings), hence the default implementation which does not do any of that.