pub struct OAuthState { /* private fields */ }Expand description
OAuth 2.0 state extracted from the signed _oauth_state cookie.
This is an axum extractor. Add it as a handler parameter on your callback route to
automatically parse and verify the state cookie that was set by AuthorizationRequest.
Requires a Key to be registered in the
Registry so that the cookie signature can be verified.
Returns crate::Error::bad_request if the cookie is missing, tampered with, or
structurally invalid.
Trait Implementations§
Source§impl<S> FromRequestParts<S> for OAuthState
impl<S> FromRequestParts<S> for OAuthState
Auto Trait Implementations§
impl Freeze for OAuthState
impl RefUnwindSafe for OAuthState
impl Send for OAuthState
impl Sync for OAuthState
impl Unpin for OAuthState
impl UnsafeUnpin for OAuthState
impl UnwindSafe for OAuthState
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
Source§impl<S, T> FromRequest<S, ViaParts> for T
impl<S, T> FromRequest<S, ViaParts> for T
Source§type Rejection = <T as FromRequestParts<S>>::Rejection
type Rejection = <T as FromRequestParts<S>>::Rejection
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
Source§fn from_request(
req: Request<Body>,
state: &S,
) -> impl Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>>
fn from_request( req: Request<Body>, state: &S, ) -> impl Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>>
Perform the extraction.