renamed methods of extended Helper
This commit is contained in:
parent
99358c1f62
commit
f08edf6985
|
@ -40,7 +40,7 @@ public class OpenIdConnectRESTHelperExtended extends OpenIdConnectRESTHelper {
|
||||||
* unauthorized call), inspect the
|
* unauthorized call), inspect the
|
||||||
* exception for details
|
* exception for details
|
||||||
*/
|
*/
|
||||||
public static JWTToken queryExchangeToken(URL tokenUrl, String authorization, String audience, String client_id,
|
public static JWTToken ExtendedQueryExchangeToken(URL tokenUrl, String authorization, String audience, String client_id,
|
||||||
String client_secret,
|
String client_secret,
|
||||||
List<String> permissions) throws OpenIdConnectRESTHelperException {
|
List<String> permissions) throws OpenIdConnectRESTHelperException {
|
||||||
|
|
||||||
|
@ -87,16 +87,16 @@ public class OpenIdConnectRESTHelperExtended extends OpenIdConnectRESTHelper {
|
||||||
// logger.info("Query exchangeToken, params " + params);
|
// logger.info("Query exchangeToken, params " + params);
|
||||||
// logger.info("Query exchangeToken, extraHeaders " + extraHeaders);
|
// logger.info("Query exchangeToken, extraHeaders " + extraHeaders);
|
||||||
|
|
||||||
return performQueryTokenWithPOST(tokenUrl, null, params, extraHeaders);
|
return ExtenedPerformQueryTokenWithPOST(tokenUrl, null, params, extraHeaders);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static JWTToken performQueryTokenWithPOST(URL tokenURL, String authorization,
|
protected static JWTToken ExtenedPerformQueryTokenWithPOST(URL tokenURL, String authorization,
|
||||||
Map<String, List<String>> params, Map<String, String> headers) throws OpenIdConnectRESTHelperException {
|
Map<String, List<String>> params, Map<String, String> headers) throws OpenIdConnectRESTHelperException {
|
||||||
|
|
||||||
// logger.debug("Querying access token from OIDC server with URL: {}", tokenURL);
|
// logger.debug("Querying access token from OIDC server with URL: {}", tokenURL);
|
||||||
StringBuilder sb;
|
StringBuilder sb;
|
||||||
try {
|
try {
|
||||||
HttpURLConnection httpURLConnection = performURLEncodedPOSTSendData(tokenURL, params, authorization,
|
HttpURLConnection httpURLConnection = ExtendedPerformURLEncodedPOSTSendData(tokenURL, params, authorization,
|
||||||
headers);
|
headers);
|
||||||
|
|
||||||
sb = new StringBuilder();
|
sb = new StringBuilder();
|
||||||
|
@ -135,7 +135,7 @@ public class OpenIdConnectRESTHelperExtended extends OpenIdConnectRESTHelper {
|
||||||
return JWTToken.fromString(sb.toString());
|
return JWTToken.fromString(sb.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static HttpURLConnection performURLEncodedPOSTSendData(URL url, Map<String, List<String>> params,
|
protected static HttpURLConnection ExtendedPerformURLEncodedPOSTSendData(URL url, Map<String, List<String>> params,
|
||||||
String authorization, Map<String, String> headers)
|
String authorization, Map<String, String> headers)
|
||||||
throws IOException, ProtocolException, UnsupportedEncodingException {
|
throws IOException, ProtocolException, UnsupportedEncodingException {
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ public class RPTTokenReader extends MVCPortlet {
|
||||||
// log.info("client_id " + configuration.getPortalClientId());
|
// log.info("client_id " + configuration.getPortalClientId());
|
||||||
// log.info("client_secret " + configuration.getPortalClientSecret());
|
// log.info("client_secret " + configuration.getPortalClientSecret());
|
||||||
|
|
||||||
exchangedToken = OpenIdConnectRESTHelperExtended.queryExchangeToken(
|
exchangedToken = OpenIdConnectRESTHelperExtended.ExtendedQueryExchangeToken(
|
||||||
configuration.getTokenURL(),
|
configuration.getTokenURL(),
|
||||||
authToken.getAccessTokenString(),
|
authToken.getAccessTokenString(),
|
||||||
urlEncodedContext,
|
urlEncodedContext,
|
||||||
|
|
Loading…
Reference in New Issue