Struct oauth2::PkceCodeVerifierS256
source · pub struct PkceCodeVerifierS256(_);
Expand description
Code Verifier used for PKCE protection via the
code_verifier
parameter. The value must have a minimum length of 43 characters and a
maximum length of 128 characters. Each character must be ASCII alphanumeric or one of
the characters “-” / “.” / “_” / “~”.
Implementations§
source§impl PkceCodeVerifierS256
impl PkceCodeVerifierS256
sourcepub fn new_random() -> Self
pub fn new_random() -> Self
Generate a new random, base64-encoded code verifier.
sourcepub fn new_random_len(num_bytes: u32) -> Self
pub fn new_random_len(num_bytes: u32) -> Self
Generate a new random, base64-encoded code 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.
sourcepub fn code_challenge(&self) -> PkceCodeChallengeS256
pub fn code_challenge(&self) -> PkceCodeChallengeS256
Return the code challenge for the code verifier.
sourcepub fn code_challenge_method() -> PkceCodeChallengeMethod
pub fn code_challenge_method() -> PkceCodeChallengeMethod
Return the code challenge method for this code verifier.
Return the extension params used for authorize_url.
Trait Implementations§
source§impl Clone for PkceCodeVerifierS256
impl Clone for PkceCodeVerifierS256
source§fn clone(&self) -> PkceCodeVerifierS256
fn clone(&self) -> PkceCodeVerifierS256
Returns a copy 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 moresource§impl Debug for PkceCodeVerifierS256
impl Debug for PkceCodeVerifierS256
source§impl<'de> Deserialize<'de> for PkceCodeVerifierS256
impl<'de> Deserialize<'de> for PkceCodeVerifierS256
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more