pub struct Challenge {
pub challenge_id: String,
pub verify_url: String,
pub pkce_verifier: Option<String>,
pub nonce: String,
pub expires_at: u64,
}Expand description
A provider-issued challenge. The verify_url is what we surface to
the user; the optional state-bag (pkce_verifier, nonce) is what
we hold privately so we can validate the callback.
Fields§
§challenge_id: String§verify_url: StringThe URL the user opens in a browser to complete verification.
For real OAuth providers this is the authorize URL with a
state=<challenge_id> query param. For the mock provider it’s
the local server’s /verify/<id> endpoint.
pkce_verifier: Option<String>PKCE verifier (for OAuth 2.0 + PKCE flows). Stored alongside the challenge so the callback handler can complete the token exchange.
nonce: StringAnti-replay nonce embedded in the authorize URL and validated on callback.
expires_at: u64When this challenge expires; the callback server reaps any challenge older than this.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Challenge
impl RefUnwindSafe for Challenge
impl Send for Challenge
impl Sync for Challenge
impl Unpin for Challenge
impl UnsafeUnpin for Challenge
impl UnwindSafe for Challenge
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