Source:
<code>protected String buildBody(JwtTokenInfoDTO jwtTokenInfoDTO) { long currentTime = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis()); long expireIn; if (jwtTokenInfoDTO.getExpirationTime() == -1 || jwtTokenInfoDTO.getExpirationTime() > (Integer.MAX_VALUE-currentTime)) { expireIn = -1; } else { expireIn = currentTime + jwtTokenInfoDTO.getExpirationTime(); } String issuerIdentifier = OAuthServerConfiguration.getInstance().getOpenIDConnectIDTokenIssuerIdentifier(); JWTClaimsSet.Builder jwtClaimsSetBuilder = new JWTClaimsSet.Builder(); <START> jwtClaimsSetBuilder.claim("sub", APIUtil.getUserNameWithTenantSuffix(jwtTokenInfoDTO.getEndUserName())); <END> jwtClaimsSetBuilder.claim("jti", UUID.randomUUID().toString()); jwtClaimsSetBuilder.claim("iss", issuerIdentifier); jwtClaimsSetBuilder.claim("iat", currentTime); if (expireIn != -1) { jwtClaimsSetBuilder.claim("exp", expireIn); } jwtClaimsSetBuilder.claim("subscribedAPIs", jwtTokenInfoDTO.getSubscribedApiDTOList()); jwtClaimsSetBuilder.claim("tierInfo", jwtTokenInfoDTO.getSubscriptionPolicyDTOList()); jwtClaimsSetBuilder.claim("application", jwtTokenInfoDTO.getApplication()); jwtClaimsSetBuilder.claim("keytype", jwtTokenInfoDTO.getKeyType()); return jwtClaimsSetBuilder.build().toJSONObject().toJSONString(); }</code><technical_language>constants declared in APIConstants.JwtTokenConstants</technical_language>

Target:
protected String buildBody(JwtTokenInfoDTO jwtTokenInfoDTO) { long currentTime = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis()); long expireIn; if (jwtTokenInfoDTO.getExpirationTime() == -1 || jwtTokenInfoDTO.getExpirationTime() > (Integer.MAX_VALUE-currentTime)) { expireIn = -1; } else { expireIn = currentTime + jwtTokenInfoDTO.getExpirationTime(); } String issuerIdentifier = OAuthServerConfiguration.getInstance().getOpenIDConnectIDTokenIssuerIdentifier(); JWTClaimsSet.Builder jwtClaimsSetBuilder = new JWTClaimsSet.Builder(); jwtClaimsSetBuilder.claim(APIConstants.JwtTokenConstants.END_USERNAME, APIUtil.getUserNameWithTenantSuffix(jwtTokenInfoDTO.getEndUserName())); jwtClaimsSetBuilder.claim(APIConstants.JwtTokenConstants.JWT_ID, UUID.randomUUID().toString()); jwtClaimsSetBuilder.claim(APIConstants.JwtTokenConstants.ISSUER_IDENTIFIER, issuerIdentifier); jwtClaimsSetBuilder.claim(APIConstants.JwtTokenConstants.ISSUED_TIME, currentTime); if (expireIn != -1) { jwtClaimsSetBuilder.claim(APIConstants.JwtTokenConstants.EXPIRY_TIME, expireIn); } jwtClaimsSetBuilder.claim(APIConstants.JwtTokenConstants.SUBSCRIBED_APIS, jwtTokenInfoDTO.getSubscribedApiDTOList()); jwtClaimsSetBuilder.claim(APIConstants.JwtTokenConstants.TIER_INFO, jwtTokenInfoDTO.getSubscriptionPolicyDTOList()); jwtClaimsSetBuilder.claim(APIConstants.JwtTokenConstants.APPLICATION, jwtTokenInfoDTO.getApplication()); jwtClaimsSetBuilder.claim(APIConstants.JwtTokenConstants.KEY_TYPE, jwtTokenInfoDTO.getKeyType()); if (jwtTokenInfoDTO.getPermittedIP() != null) { jwtClaimsSetBuilder.claim(APIConstants.JwtTokenConstants.PERMITTED_IP, jwtTokenInfoDTO.getPermittedIP()); } if (jwtTokenInfoDTO.getPermittedReferer() != null) { jwtClaimsSetBuilder.claim(APIConstants.JwtTokenConstants.PERMITTED_REFERER, jwtTokenInfoDTO.getPermittedReferer()); } return jwtClaimsSetBuilder.build().toJSONObject().toJSONString(); }