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
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'
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'
What action to execute next.
Multiple actions form a linked chain; the chain must always terminate in a (weighted)forward, fixedResponse or redirect action.