Struct oxide_auth_rocket::OAuthRequest
source · pub struct OAuthRequest<'r> { /* private fields */ }
Expand description
Request guard that also buffers OAuth data internally.
Implementations§
source§impl<'r> OAuthRequest<'r>
impl<'r> OAuthRequest<'r>
sourcepub fn new<'a>(request: &'a Request<'r>) -> Self
pub fn new<'a>(request: &'a Request<'r>) -> Self
Create the request data from request headers.
Some oauth methods need additionally the body data which you can attach later.
sourcepub fn add_body(&mut self, data: Data)
pub fn add_body(&mut self, data: Data)
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§
source§impl<'a, 'r> FromRequest<'a, 'r> for OAuthRequest<'r>
impl<'a, 'r> FromRequest<'a, 'r> for OAuthRequest<'r>
source§impl<'r> WebRequest for OAuthRequest<'r>
impl<'r> WebRequest for OAuthRequest<'r>
§type Response = OAuthResponse<'r>
type Response = OAuthResponse<'r>
The corresponding type of Responses returned from this module.
source§fn query(
&mut self
) -> Result<Cow<'_, dyn QueryParameter + 'static>, Self::Error>
fn query( &mut self ) -> Result<Cow<'_, dyn QueryParameter + 'static>, Self::Error>
Retrieve a parsed version of the url query. Read more
Auto Trait Implementations§
impl<'r> Freeze for OAuthRequest<'r>
impl<'r> RefUnwindSafe for OAuthRequest<'r>
impl<'r> Send for OAuthRequest<'r>
impl<'r> Sync for OAuthRequest<'r>
impl<'r> Unpin for OAuthRequest<'r>
impl<'r> UnwindSafe for OAuthRequest<'r>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more