MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / generate_code_verifier

Function generate_code_verifier

crates/chat-cli/src/auth/pkce.rs:462–464  ·  view source on GitHub ↗

Generates a random 43-octet URL safe string according to the RFC recommendation. Reference: https://datatracker.ietf.org/doc/html/rfc7636#section-4.1

()

Source from the content-addressed store, hash-verified

460///
461/// Reference: https://datatracker.ietf.org/doc/html/rfc7636#section-4.1
462fn generate_code_verifier() -> String {
463 URL_SAFE.encode(rand::random::<[u8; 32]>()).replace('=', "")
464}
465
466/// Base64 URL encoded sha256 hash of the code verifier.
467///

Callers 2

registerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected