Class JwtClientIdKeyResolver
java.lang.Object
com.networknt.aws.lambda.handler.middleware.limit.key.JwtClientIdKeyResolver
- All Implemented Interfaces:
KeyResolver
When the rate limit handler is located after the JwtVerifierHandler in the request/response chain, we can
get the client_id claim from the JWT token from the auditInfo object from the exchange attachment. In this
way, we can set up rate limit per client_id to give priority client more access to our services.
- Author:
- Steve Hu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolve(LightLambdaExchange exchange) Resolve a unique key from the exchange
-
Constructor Details
-
JwtClientIdKeyResolver
public JwtClientIdKeyResolver()
-
-
Method Details
-
resolve
Description copied from interface:KeyResolverResolve a unique key from the exchange- Specified by:
resolvein interfaceKeyResolver- Parameters:
exchange- lambda exchange- Returns:
- A string for the key
-