Skip to content

pkce

Structs

  • AuthorizationAttempt - A single authorization attempt, including its state and PKCE verifier.
  • AuthorizationState - An opaque CSRF state value for a single authorization attempt.
  • PkceChallenge - A public PKCE S256 challenge derived from a [PkceVerifier].
  • PkceVerifier - An opaque PKCE verifier for a single authorization attempt.

Struct

A single authorization attempt, including its state and PKCE verifier.

The secret values are opaque: callers can forward their domain types to later login-flow steps but cannot accidentally format or clone them.

Methods:

  • fn start() -> Result<Self, EntropyError> - Start a new authorization attempt using independent random state and
  • fn state(self: &Self) -> &AuthorizationState - Return the opaque authorization state for this attempt.
  • fn verifier(self: &Self) -> &PkceVerifier - Return the opaque PKCE verifier for this attempt.
  • fn pkce_challenge(self: &Self) -> &PkceChallenge - Return the public PKCE S256 challenge for this attempt.
  • fn bind_loopback(self: Self) -> Result<PendingAuthorizationAttempt, LoopbackCallbackListenerError> - Bind the loopback callback for this attempt.

Struct

An opaque CSRF state value for a single authorization attempt.

Tuple Struct: ()

Methods:

  • fn as_str(self: &Self) -> &str - Return the state value for the authorization request query.
  • fn matches(self: &Self, received: &Self) -> bool - Return whether two opaque authorization states are equal.

Struct

A public PKCE S256 challenge derived from a [PkceVerifier].

Tuple Struct: ()

Methods:

  • fn as_str(self: &Self) -> &str - Return the URL-safe base64 encoded PKCE S256 challenge.

Traits: Eq

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • PartialEq
    • fn eq(self: &Self, other: &Self) -> bool

Struct

An opaque PKCE verifier for a single authorization attempt.

Tuple Struct: ()

Methods:

  • fn as_secret(self: &Self) -> &SecretString - Return the secret verifier for the token-exchange boundary.