• Public
  • Public/Protected
  • All




Re-exports LogLevel


Re-exports Logger


Re-exports ProtocolMode

Type aliases


Configuration: { auth?: TokenValidationOptions; system?: SystemOptions }

This object allows you to configure elements of the TokenValidator's functionality, and is passed into the constructor of TokenValidator.

Type declaration

  • Optional auth?: TokenValidationOptions

    This is where you configure auth elements like the authority used, the protocol used, and whether there is a clock skew.

  • Optional system?: SystemOptions

    This is where you configure the logger and network client.


TokenValidationMiddlewareResponse: (req: ExpressRequest, res: ExpressResponse, next: ExpressNextFunction) => void

Response object for token validation middleware API

  • req - Express Request object
  • res - Express Response object
  • next - Express Next function

Type declaration

    • (req: ExpressRequest, res: ExpressResponse, next: ExpressNextFunction): void
    • Parameters

      • req: ExpressRequest
      • res: ExpressResponse
      • next: ExpressNextFunction

      Returns void


TokenValidationParameters: Partial<BaseValidationParameters> & { validAudiences: Required<string[]>; validIssuers: Required<string[]> }

Validation parameters object set by the user that contains options for the token to be validated against. All claims are optional except for validIssuers and validAudiences, which are required.

The following OIDC-compliant claims on a JSON Web Token (JWT) are validated if set:

  • validIssuers
  • validAudiences
  • subject

The following additional claims are validated if set:

  • nonce
  • code
  • accessTokenForAtHash

The following parameters are for decoding and validating the JSON Web Signature (JWS):

  • validAlgorithms
  • issuerSigningKeys
  • issuerSigningJwksUri

The following are additional parameters that currently have defaults. These parameters will be used in future validation scenarios:

  • validTypes
  • requireExpirationTime
  • requireSignedTokens

Additional information about claims can be found here: https://openid.net/specs/openid-connect-core-1_0.html#IDToken https://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation https://openid.net/specs/openid-connect-core-1_0.html#ImplicitTokenValidation


TokenValidationResponse: { payload?: JWTPayload; protectedHeader?: JWTHeaderParameters; token?: string; tokenType?: string }

Response object for token validation responses

Type declaration

  • Optional payload?: JWTPayload

    Payload of JWT token

  • Optional protectedHeader?: JWTHeaderParameters

    Header of JWT token

  • Optional token?: string

    Original token sent in for validation

  • Optional tokenType?: string

    Type of token, defaults to JWT

Generated using TypeDoc