Module helpers

Module helpers 

Source
Expand description

Helpers

Functions§

code_challenge
Generates the S256 PKCE code challenge for verifier.
convert_json_to
Converts plain JSON to a struct/enum that impl’s serde’s Deserialize. Uses serde_json::from_str under the hood
decode_jwt
Decodes a JWT without verification
generate_code_verifier
Generates a random string as the code_verifier. Uses generate_random under the hood.
generate_nonce
Generates a random string as the nonce. Uses generate_random under the hood.
generate_random
Generates a random string using rand::thread_rng. You can pass in the bytes to generates
generate_state
Generates a random string as the state. Uses generate_random under the hood.
get_s256_jwk_thumbprint
Gets S256 thumbprint of a JWK JSON.
now
Gets a Unix Timestamp in seconds. Uses SystemTime::now