Class JwtHeaderClientIdKeyResolver
- java.lang.Object
-
- com.networknt.aws.lambda.handler.middleware.limit.key.JwtHeaderClientIdKeyResolver
-
- All Implemented Interfaces:
KeyResolver
public class JwtHeaderClientIdKeyResolver extends Object implements KeyResolver
This is a customized KeyResolver for one of our customers on the external gateway in the DMZ. There are many external clients that are using the Okta JWT token to access the internal APIs. However, some external clients doesn't support OAuth 2.0, so they will put a client_id and client_secret in the request header to authenticate themselves. So we need to check the JWT token first and then get the client_id from the header second if the JWT doesn't exist.- Author:
- Steve Hu
-
-
Constructor Summary
Constructors Constructor Description JwtHeaderClientIdKeyResolver()
-
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
-
-