[−][src]Struct oxide_auth::frontends::rocket::OAuthRequest
Request guard that also buffers OAuth data internally.
WebRequest etc. is implemented for the basic rocket::Request<'r> as well. Both have the
same error and result types but of course we can not simply implement the former as a request
guard with special semantics. Therefore, we wrap in here and at the same time buffer all the
computed state such as parameter checking and normalization.
Methods
impl<'r> OAuthRequest<'r>[src]
pub fn new<'a>(request: &'a Request<'r>) -> Self[src]
Create the request data from request headers.
Some oauth methods need additionally the body data which you can attach later.
pub fn add_body(&mut self, data: Data)[src]
Provide the body of the request.
Some, but not all operations, require reading their data from a urlencoded POST body. To simplify the implementation of primitives and handlers, this type is the central request type for both these use cases. When you forget to provide the body to a request, the oauth system will return an error the moment the request is used.
Trait Implementations
impl<'r> WebRequest for OAuthRequest<'r>[src]
type Error = WebError
The error generated from access of malformed or invalid requests.
type Response = Response<'r>
The corresponding type of Responses returned from this module.
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, 'r> FromRequest<'a, 'r> for OAuthRequest<'r>[src]
Auto Trait Implementations
impl<'r> Unpin for OAuthRequest<'r>
impl<'r> Send for OAuthRequest<'r>
impl<'r> Sync for OAuthRequest<'r>
impl<'r> RefUnwindSafe for OAuthRequest<'r>
impl<'r> UnwindSafe for OAuthRequest<'r>
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,