Struct oauth2::PkceCodeChallenge[][src]

pub struct PkceCodeChallenge { /* fields omitted */ }
Expand description

Code Challenge used for PKCE protection via the code_challenge parameter.

Implementations

Generate a new random, base64-encoded SHA-256 PKCE code.

Generate a new random, base64-encoded SHA-256 PKCE challenge code and verifier.

Arguments

  • num_bytes - Number of random bytes to generate, prior to base64-encoding. The value must be in the range 32 to 96 inclusive in order to generate a verifier with a suitable length.

Panics

This method panics if the resulting PKCE code verifier is not of a suitable length to comply with RFC 7636.

Generate a SHA-256 PKCE code challenge from the supplied PKCE code verifier.

Panics

This method panics if the supplied PKCE code verifier is not of a suitable length to comply with RFC 7636.

Generate a new random, base64-encoded PKCE code. Use is discouraged unless the endpoint does not support SHA-256.

Panics

This method panics if the supplied PKCE code verifier is not of a suitable length to comply with RFC 7636.

Generate a plain PKCE code challenge from the supplied PKCE code verifier. Use is discouraged unless the endpoint does not support SHA-256.

Panics

This method panics if the supplied PKCE code verifier is not of a suitable length to comply with RFC 7636.

Returns the PKCE code challenge as a string.

Returns the PKCE code challenge method as a string.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.