pub struct AuthorizationRequest {
pub url: String,
pub state: String,
pub pkce: Option<PKCEChallenge>,
pub nonce: Option<NonceParameter>,
}Expand description
Result of OAuth2Client::authorization_url.
The caller MUST store state (for CSRF verification at callback), when
present the PKCE pkce.code_verifier (for token exchange), and when
present the nonce value (must be verified against the ID token at
callback via OIDCClient::verify_id_token).
Fields§
§url: StringThe full authorization URL to redirect the user to.
state: StringCSRF state value — verify this matches the state query param at callback.
pkce: Option<PKCEChallenge>PKCE challenge, present only when use_pkce = true.
nonce: Option<NonceParameter>OIDC nonce for replay protection.
Present only when the authorization URL was generated by
OIDCClient::authorization_url. The caller must store this value
and pass Some(&nonce.nonce) to OIDCClient::verify_id_token at
callback time.
Trait Implementations§
Source§impl Clone for AuthorizationRequest
impl Clone for AuthorizationRequest
Source§fn clone(&self) -> AuthorizationRequest
fn clone(&self) -> AuthorizationRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AuthorizationRequest
impl RefUnwindSafe for AuthorizationRequest
impl Send for AuthorizationRequest
impl Sync for AuthorizationRequest
impl Unpin for AuthorizationRequest
impl UnsafeUnpin for AuthorizationRequest
impl UnwindSafe for AuthorizationRequest
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more