Class SignPoPToken

Hierarchy

  • SignJWT
    • SignPoPToken

Constructors

Properties

_payload: Partial<PoPTokenPayload> = {}

Payload of the PoP Token.

Methods

  • Set "exp" (Expiration Time) Claim.

    Parameters

    • input: string | number

      "exp" (Expiration Time) Claim value to set on the JWT Claims Set. When number is passed that is used as a value, when string is passed it is resolved to a time span and added to the current timestamp.

    Returns SignPoPToken

  • Set "iss" (Issuer) Claim.

    Parameters

    • issuer: string

      "Issuer" Claim value to set on the JWT Claims Set.

    Returns SignPoPToken

  • Set "nbf" (Not Before) Claim.

    Parameters

    • input: string | number

      "nbf" (Not Before) Claim value to set on the JWT Claims Set. When number is passed that is used as a value, when string is passed it is resolved to a time span and added to the current timestamp.

    Returns SignPoPToken

  • Set "sub" (Subject) Claim.

    Parameters

    • subject: string

      "sub" (Subject) Claim value to set on the JWT Claims Set.

    Returns SignPoPToken

  • Signs and returns the JWT.

    Parameters

    • key: Uint8Array | KeyLike

      Private Key or Secret to sign the JWT with. See Algorithm Key Requirements.

    • Optional options: SignOptions

      JWT Sign options.

      Optional

    Returns Promise<string>

Generated using TypeDoc