Skip to content
v2.274.0

AuthenticateJwtOptions Struct ​

Options for ListenerAction.authenticateJwt().

Example ​

ts
declare const lb: elbv2.ApplicationLoadBalancer;
declare const certificate: elbv2.IListenerCertificate;
declare const myTargetGroup: elbv2.ApplicationTargetGroup;

// JWT authentication requires HTTPS
const listener = lb.addListener('Listener', {
  protocol: elbv2.ApplicationProtocol.HTTPS,
  port: 443,
  certificates: [certificate],
  defaultAction: elbv2.ListenerAction.authenticateJwt({
    issuer: 'https://issuer.example.com',
    jwksEndpoint: 'https://issuer.example.com/.well-known/jwks.json',
    next: elbv2.ListenerAction.forward([myTargetGroup]),
  }),
});

Properties ​

issuerstringissuerstrissuerStringIssuerstringIssuer*stringrequired#
The issuer of the JWT token.

This must be a full URL, including the HTTPS protocol, the domain, and the path.

example
ts
'https://issuer.example.com'
jwksEndpointstringjwks_endpointstrjwksEndpointStringJwksEndpointstringJwksEndpoint*stringrequired#
The JWKS (JSON Web Key Set) endpoint URL.

The endpoint must be publicly accessible and return the public keys used to verify JWT signatures.

example
ts
'https://issuer.example.com/jwks'