Options
All
  • Public
  • Public/Protected
  • All
Menu

To generate code verifier and code challenge

Hierarchy

  • SecurityHelper

Index

Constructors

Methods

  • base64urlencode(buffer: any): string
  • Parameters

    • buffer: any

      Array Buffer

    Returns string

    • base64 endcoded url
    @example
    base64urlencode([]);
  • dec2hex(dec: number): string
  • Convert decimal to hexadecimal

    Parameters

    • dec: number

      decimal number

    Returns string

    • hexadecimal - 20
    @example
    dec2hex(32);
  • generateCodeChallengeFromVerifier(verifier: string): Promise<string>
  • To generate the code challenge

    Parameters

    • verifier: string

      code verifier

    Returns Promise<string>

    • base64 Encoded value - ftMwffFeP8uzj-D9BKFG
    @example
    generateCodeChallengeFromVerifier('dfd7fe9fff84d20091bd6c');
  • generateCodeVerifier(): string
  • To generate the code verifier

    Returns string

    • code verifier
    @example
    generateCodeVerifier();
  • sha256(plain: string): Promise<ArrayBuffer>
  • Parameters

    • plain: string

      Code verifier

    Returns Promise<ArrayBuffer>

    • Array Buffer
    @example
    sha256('dfd7fe9fff84d20091bd6c');

Generated using TypeDoc