diff --git a/openapi-security/src/main/java/com/networknt/openapi/JwtVerifyHandler.java b/openapi-security/src/main/java/com/networknt/openapi/JwtVerifyHandler.java index 7357c737..63c9f3e7 100644 --- a/openapi-security/src/main/java/com/networknt/openapi/JwtVerifyHandler.java +++ b/openapi-security/src/main/java/com/networknt/openapi/JwtVerifyHandler.java @@ -100,6 +100,8 @@ public void handleRequest(final HttpServerExchange exchange) throws Exception { auditInfo.put(Constants.CLIENT_ID_STRING, claims.getStringClaimValue(Constants.CLIENT_ID_STRING)); auditInfo.put(Constants.USER_ID_STRING, claims.getStringClaimValue(Constants.USER_ID_STRING)); auditInfo.put(Constants.SUBJECT_CLAIMS, claims); + String callerId = headerMap.getFirst(HttpStringConstants.CALLER_ID); + if(callerId != null) auditInfo.put(Constants.CALLER_ID_STRING, callerId); if(config != null && (Boolean)config.get(ENABLE_VERIFY_JWT_SCOPE_TOKEN) && OpenApiHelper.openApi3 != null) { Operation operation = null; OpenApiOperation openApiOperation = (OpenApiOperation)auditInfo.get(Constants.OPENAPI_OPERATION_STRING);