spotless/proof_key_for_code_exchange

Types

pub type CodeChallengeMethod {
  Plain
  S256
}

Constructors

  • Plain
  • S256

Values

pub fn code_challenge_method_from_string(
  raw: String,
) -> Result(CodeChallengeMethod, Nil)
pub fn code_challenge_method_to_string(
  method: CodeChallengeMethod,
) -> String
pub fn create_code_challenge(
  verifier: String,
  method: CodeChallengeMethod,
  hash: fn(effect.HashAlgorithm, BitArray) -> fn(
    fn(BitArray) -> t,
  ) -> t,
) -> fn(fn(String) -> t) -> t

If the client is capable of using “S256”, it MUST use “S256”, as “S256” is Mandatory To Implement (MTI) on the server.

pub fn create_code_verifier(
  strong_random: fn(Int) -> fn(fn(BitArray) -> t) -> t,
) -> fn(fn(String) -> t) -> t

It is RECOMMENDED that the output of a suitable random number generator be used to create a 32-octet sequence. The octet sequence is then base64url-encoded to produce a 43-octet URL safe string to use as the code verifier.

pub fn create_s256_code_challenge(
  verifier: String,
  hash: fn(effect.HashAlgorithm, BitArray) -> fn(
    fn(BitArray) -> t,
  ) -> t,
) -> fn(fn(String) -> t) -> t
Search Document