Package com.networknt.limit.key
Class JwtClientIdKeyResolver
- java.lang.Object
-
- com.networknt.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(io.undertow.server.HttpServerExchange exchange)Resolve a unique key from the exchange
-
-
-
Method Detail
-
resolve
public String resolve(io.undertow.server.HttpServerExchange exchange)
Description copied from interface:KeyResolverResolve a unique key from the exchange- Specified by:
resolvein interfaceKeyResolver- Parameters:
exchange- server exchange- Returns:
- A string for the key
-
-