Interface IAuthOptions<P>

Options for the middy-middleware-jwt-auth

Type Parameters

  • P = any

Hierarchy

  • IAuthOptions

Properties

Algorithm to verify JSON web token signature

credentialsRequired?: boolean

An optional boolean that allows making authorization necessary

isPayload?: ((payload: any) => payload is P)

Type declaration

    • (payload: any): payload is P
    • An optional type guard function that verifies token payload structure

      Parameters

      • payload: any

      Returns payload is P

secretOrPublicKey: string | Buffer

A string or buffer containing either the secret for HMAC algorithms, or the PEM encoded public key for RSA and ECDSA

tokenSource?: ((event: any) => string)

Type declaration

    • (event: any): string
    • An optional function to get the authorization token from the event

      Parameters

      • event: any

      Returns string