private String generateCHash(String algorithm,OAuth2Request request,OAuth2ProviderSettings providerSettings) throws ServerException {
  final AuthorizationCode authorizationCode=request.getToken(AuthorizationCode.class);
  if (authorizationCode == null) {
    logger.message("c_hash generation requires an existing code.");
    return null;
  }
  final String codeValue=authorizationCode.getTokenId();
  return generateHash(algorithm,codeValue,providerSettings);
}

private String generateCHash ( String algorithm , OAuth2Request request , OAuth2ProviderSettings providerSettings ) throws ServerException { final AuthorizationCode authorizationCode = request . getToken ( AuthorizationCode . class ) ; if ( authorizationCode == null ) { logger . message ( "c_hash generation requires an existing code." ) ; return null ; } final String codeValue = authorizationCode . getTokenId ( ) ; return generateHash ( algorithm , codeValue , providerSettings ) ; }
for c_hash , used when code and id_token exist in scope .
