Class JwtClientIdKeyResolver
- java.lang.Object
-
- com.networknt.aws.lambda.handler.middleware.limit.key.JwtClientIdKeyResolver
-
- All Implemented Interfaces:
KeyResolver
public class JwtClientIdKeyResolver extends Object implements 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 Constructor Description JwtClientIdKeyResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringresolve(LightLambdaExchange exchange)Resolve a unique key from the exchange
-
-
-
Method Detail
-
resolve
public String resolve(LightLambdaExchange exchange)
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
-
-