private HashMap < String , JSONObject > getKeyMapFromJWKSUri ( ) throws OpenIdException { logger . debug ( "Enter OAuth2PlatformClient::getKeyMapFromJWKSUri" ) ; try { HttpRequestClient client = new HttpRequestClient ( oauth2Config . getProxyConfig ( ) ) ; Request request = new Request . RequestBuilder ( MethodType . GET , oauth2Config . getIntuitJwksURI ( ) ) . requiresAuthentication ( false ) . build ( ) ; Response response = client . makeRequest ( request ) ; logger . debug ( "Response Code : " + response . getStatusCode ( ) ) ; if ( response . getStatusCode ( ) != 200 ) { logger . debug ( "failed JWKS URI" ) ; throw new OpenIdException ( "failed JWKS URI" , response . getStatusCode ( ) + "" ) ; } return buildKeyMap ( response . getContent ( ) ) ; } catch ( Exception ex ) { logger . error ( "Exception while retrieving jwks " , ex ) ; throw new OpenIdException ( ex . getMessage ( ) , ex ) ; } }
Build JWKS keymap