[][src]Struct oauth2::PkceCodeChallenge

pub struct PkceCodeChallenge { /* fields omitted */ }

Code Challenge used for PKCE protection via the code_challenge parameter.

Implementations

impl PkceCodeChallenge[src]

pub fn new_random_sha256() -> (Self, PkceCodeVerifier)[src]

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

pub fn new_random_sha256_len(num_bytes: u32) -> (Self, PkceCodeVerifier)[src]

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

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.

pub fn from_code_verifier_sha256(code_verifier: &PkceCodeVerifier) -> Self[src]

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.

pub fn as_str(&self) -> &str[src]

Returns the PKCE code challenge as a string.

pub fn method(&self) -> &PkceCodeChallengeMethod[src]

Returns the PKCE code challenge method as a string.

Trait Implementations

impl Clone for PkceCodeChallenge[src]

impl Debug for PkceCodeChallenge[src]

impl<'de> Deserialize<'de> for PkceCodeChallenge[src]

impl PartialEq<PkceCodeChallenge> for PkceCodeChallenge[src]

impl Serialize for PkceCodeChallenge[src]

impl StructuralPartialEq for PkceCodeChallenge[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,