public Map.Entry<String,String> issueToken(AccessToken accessToken,OAuth2Request request) throws ServerException, InvalidClientException, NotFoundException {
  final Set<String> scope=accessToken.getScope();
  if (scope != null && scope.contains(OAuth2Constants.Params.OPENID)) {
    final ResourceOwner resourceOwner;
    try {
      request.setSession(accessToken.getSessionId());
      resourceOwner=resourceOwnerSessionValidator.validate(request);
      final String nonce=accessToken.getNonce();
      final OpenIdConnectToken openIdToken=tokenStore.createOpenIDToken(resourceOwner,accessToken.getClientId(),accessToken.getClientId(),nonce,getOps(accessToken,request),request);
      return new AbstractMap.SimpleEntry<>(OAuth2Constants.JWTTokenParams.ID_TOKEN,openIdToken.getTokenId());
    }
 catch (    OAuth2Exception e) {
      logger.error("User must be authenticated to issue ID tokens.",e);
      throw new ServerException("User must be authenticated to issue ID tokens.");
    }
  }
  return null;
}

public Map . Entry < String , String > issueToken ( AccessToken accessToken , OAuth2Request request ) throws ServerException , InvalidClientException , NotFoundException { final Set < String > scope = accessToken . getScope ( ) ; if ( scope != null && scope . contains ( OAuth2Constants . Params . OPENID ) ) { final ResourceOwner resourceOwner ; try { request . setSession ( accessToken . getSessionId ( ) ) ; resourceOwner = resourceOwnerSessionValidator . validate ( request ) ; final String nonce = accessToken . getNonce ( ) ; final OpenIdConnectToken openIdToken = tokenStore . createOpenIDToken ( resourceOwner , accessToken . getClientId ( ) , accessToken . getClientId ( ) , nonce , getOps ( accessToken , request ) , request ) ; return new AbstractMap . SimpleEntry < > ( OAuth2Constants . JWTTokenParams . ID_TOKEN , openIdToken . getTokenId ( ) ) ; } catch ( OAuth2Exception e ) { logger . error ( "User must be authenticated to issue ID tokens." , e ) ; throw new ServerException ( "User must be authenticated to issue ID tokens." ) ; } } return null ; }
issues an openid connect token , using the details of the access token .
