[][src]Struct oxide_auth::frontends::rocket::OAuthRequest

pub struct OAuthRequest<'r> { /* fields omitted */ }

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.

impl<'a, 'r> FromRequest<'a, 'r> for OAuthRequest<'r>[src]

type Error = NoError

The associated error to be returned if derivation fails.

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]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> UnsafeAny for T where
    T: Any

impl<T> IntoCollection<T> for T

impl<T, I> AsResult<T, I> for T where
    I: Input,