Struct oxide_auth_actix::OAuthRequest
source · [−]pub struct OAuthRequest { /* private fields */ }Expand description
Type implementing WebRequest as well as FromRequest for use in route handlers
This type consumes the body of the HttpRequest upon extraction, so be careful not to use it in places you also expect an application payload
Implementations
sourceimpl OAuthRequest
impl OAuthRequest
sourcepub async fn new(req: HttpRequest, payload: Payload) -> Result<Self, WebError>
pub async fn new(req: HttpRequest, payload: Payload) -> Result<Self, WebError>
Create a new OAuthRequest from an HttpRequest and Payload
Fetch the authorization header from the request
sourcepub fn query(&self) -> Option<&NormalizedParameter>
pub fn query(&self) -> Option<&NormalizedParameter>
Fetch the query for this request
sourcepub fn query_mut(&mut self) -> Option<&mut NormalizedParameter>
pub fn query_mut(&mut self) -> Option<&mut NormalizedParameter>
Fetch the query mutably
sourcepub fn body(&self) -> Option<&NormalizedParameter>
pub fn body(&self) -> Option<&NormalizedParameter>
Fetch the body of the request
Trait Implementations
sourceimpl Clone for OAuthRequest
impl Clone for OAuthRequest
sourcefn clone(&self) -> OAuthRequest
fn clone(&self) -> OAuthRequest
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for OAuthRequest
impl Debug for OAuthRequest
sourceimpl From<OAuthResource> for OAuthRequest
impl From<OAuthResource> for OAuthRequest
sourcefn from(o: OAuthResource) -> Self
fn from(o: OAuthResource) -> Self
Performs the conversion.
sourceimpl FromRequest for OAuthRequest
impl FromRequest for OAuthRequest
sourcefn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future
fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future
Create a Self from request parts asynchronously.
sourcefn extract(req: &HttpRequest) -> Self::Future
fn extract(req: &HttpRequest) -> Self::Future
Create a Self from request head asynchronously. Read more
sourceimpl WebRequest for OAuthRequest
impl WebRequest for OAuthRequest
type Response = OAuthResponse
type Response = OAuthResponse
The corresponding type of Responses returned from this module.
sourcefn 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 RefUnwindSafe for OAuthRequest
impl Send for OAuthRequest
impl Sync for OAuthRequest
impl Unpin for OAuthRequest
impl UnwindSafe for OAuthRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more