diff --git a/components/apimgt/org.wso2.carbon.apimgt.common.gateway/src/main/java/org/wso2/carbon/apimgt/common/gateway/jwtgenerator/APIMgtGatewayJWTGeneratorImpl.java b/components/apimgt/org.wso2.carbon.apimgt.common.gateway/src/main/java/org/wso2/carbon/apimgt/common/gateway/jwtgenerator/APIMgtGatewayJWTGeneratorImpl.java index b7cd6af18361..aaac338e3aa8 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.common.gateway/src/main/java/org/wso2/carbon/apimgt/common/gateway/jwtgenerator/APIMgtGatewayJWTGeneratorImpl.java +++ b/components/apimgt/org.wso2.carbon.apimgt.common.gateway/src/main/java/org/wso2/carbon/apimgt/common/gateway/jwtgenerator/APIMgtGatewayJWTGeneratorImpl.java @@ -91,6 +91,12 @@ public Map populateStandardClaims(JWTInfoDto jwtInfoDto) { if (jwtInfoDto.getOrganizations() != null) { claims.put(JWTConstants.ORGANIZATIONS, jwtInfoDto.getOrganizations()); } + Map jwtTokenClaims = jwtInfoDto.getJwtValidationInfo().getClaims(); + if (jwtTokenClaims != null && + jwtTokenClaims.get(JWTConstants.AUTHORIZED_USER_TYPE) != null) { + claims.put(dialect + "originalAut", jwtTokenClaims.get(JWTConstants.AUTHORIZED_USER_TYPE)); + } + return claims; }