Class PKCEAbstract

Helper class for generating verifier, challenge and state strings used for Proof Key for Code Exchange (PKCE).

Constructors

Methods

  • Creates a random state.

    Returns string

  • Creates a random verifier.

    Returns string

  • Creates a SHA-256 hash of the verifier.

    Parameters

    • verifier: string

      The verifier to hash

    Returns Promise<string>

  • Creates a base64 encoded, URL-friendly version of the specified array.

    Parameters

    • array: Uint8Array

      The array of numbers to encode

    Returns string

  • Creates a SHA-256 hash of the specified string.

    Parameters

    • value: string

      The string to hash

    Returns Promise<Uint8Array>

  • Creates a random string.

    Parameters

    • num: number = 32

    Returns string