[−][src]Trait oxide_auth::endpoint::WebRequest
Abstraction of web requests with several different abstractions and constructors needed by an endpoint. It is assumed to originate from an HTTP request, as defined in the scope of the rfc, but theoretically other requests are possible.
Associated Types
type Error
The error generated from access of malformed or invalid requests.
type Response: WebResponse<Error = Self::Error>
The corresponding type of Responses returned from this module.
Required methods
fn query(&mut self) -> Result<Cow<dyn QueryParameter + 'static>, Self::Error>
Retrieve a parsed version of the url query.
An Err return value indicates a malformed query or an otherwise malformed WebRequest. Note
that an empty query should result in Ok(HashMap::new()) instead of an Err.
fn urlbody(&mut self) -> Result<Cow<dyn QueryParameter + 'static>, Self::Error>
Retrieve the parsed application/x-form-urlencoded body of the request.
An Err value / indicates a malformed body or a different Content-Type.
fn authheader(&mut self) -> Result<Option<Cow<str>>, Self::Error>
Contents of the authorization header or none if none exists. An Err value indicates a malformed header or request.
Implementations on Foreign Types
impl<'a, W: WebRequest> WebRequest for &'a mut W[src]
type Error = W::Error
type Response = W::Response
fn query(&mut self) -> Result<Cow<dyn QueryParameter + 'static>, Self::Error>[src]
fn urlbody(&mut self) -> Result<Cow<dyn QueryParameter + 'static>, Self::Error>[src]
fn authheader(&mut self) -> Result<Option<Cow<str>>, Self::Error>[src]
impl<'a, 'b, 'c: 'b> WebRequest for &'a mut Request<'b, 'c>[src]
Requests are handed as mutable reference to the underlying object.
type Response = Response
type Error = Error
fn query(&mut self) -> Result<Cow<dyn QueryParameter + 'static>, Self::Error>[src]
fn urlbody(&mut self) -> Result<Cow<dyn QueryParameter + 'static>, Self::Error>[src]
fn authheader(&mut self) -> Result<Option<Cow<str>>, Self::Error>[src]
impl<'a> WebRequest for &'a Request[src]
type Error = WebError
type Response = Response
fn query(&mut self) -> Result<Cow<dyn QueryParameter + 'static>, Self::Error>[src]
fn urlbody(&mut self) -> Result<Cow<dyn QueryParameter + 'static>, Self::Error>[src]
fn authheader(&mut self) -> Result<Option<Cow<str>>, Self::Error>[src]
Implementors
impl WebRequest for oxide_auth::frontends::actix::request::OAuthRequest[src]
type Error = OAuthError
type Response = OAuthResponse
fn query(&mut self) -> Result<Cow<dyn QueryParameter + 'static>, Self::Error>[src]
fn urlbody(&mut self) -> Result<Cow<dyn QueryParameter + 'static>, Self::Error>[src]
fn authheader(&mut self) -> Result<Option<Cow<str>>, Self::Error>[src]
impl WebRequest for oxide_auth::frontends::simple::request::Request[src]
type Error = NoError
type Response = Response
fn query(&mut self) -> Result<Cow<dyn QueryParameter + 'static>, Self::Error>[src]
fn urlbody(&mut self) -> Result<Cow<dyn QueryParameter + 'static>, Self::Error>[src]
fn authheader(&mut self) -> Result<Option<Cow<str>>, Self::Error>[src]
impl<'r> WebRequest for oxide_auth::frontends::rocket::OAuthRequest<'r>[src]
type Error = WebError
type Response = Response<'r>
fn query(&mut self) -> Result<Cow<dyn QueryParameter + 'static>, Self::Error>[src]
fn urlbody(&mut self) -> Result<Cow<dyn QueryParameter + 'static>, Self::Error>[src]
fn authheader(&mut self) -> Result<Option<Cow<str>>, Self::Error>[src]
impl<W: WebRequest, F, T> WebRequest for MapErr<W, F, T> where
F: FnMut(W::Error) -> T, [src]
F: FnMut(W::Error) -> T,