Class 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 Detail

      • JwtClientIdKeyResolver

        public JwtClientIdKeyResolver()
    • Method Detail

      • resolve

        public String resolve​(LightLambdaExchange exchange)
        Description copied from interface: KeyResolver
        Resolve a unique key from the exchange
        Specified by:
        resolve in interface KeyResolver
        Parameters:
        exchange - lambda exchange
        Returns:
        A string for the key