Update dependency of nimbus-jose-jwt and oauth2-oidc-sdk
Change-Id: Icf8ca5a753df7493179c41f478ec9a26cf477c18
diff --git a/full/Changes b/full/Changes
index b2fbd03..49be3dd 100644
--- a/full/Changes
+++ b/full/Changes
@@ -1,4 +1,6 @@
# version 0.63
+26/10/2020
+ - Updated dependency of nimbus-jose-jwt and oauth2-oidc-sdk (diewald)
# version 0.62.4
24/01/2020
diff --git a/full/pom.xml b/full/pom.xml
index 7277290..b2e9b23 100644
--- a/full/pom.xml
+++ b/full/pom.xml
@@ -307,14 +307,14 @@
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
- <version>[7.9,)</version>
+ <version>9.1.1</version>
</dependency>
<!-- OpenId -->
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>oauth2-oidc-sdk</artifactId>
- <version>5.62</version>
+ <version>8.23</version>
</dependency>
<!-- Project Lombok -->
diff --git a/full/src/main/java/de/ids_mannheim/korap/oauth2/openid/OpenIdHttpRequestWrapper.java b/full/src/main/java/de/ids_mannheim/korap/oauth2/openid/OpenIdHttpRequestWrapper.java
index a489ef6..998d1eb 100644
--- a/full/src/main/java/de/ids_mannheim/korap/oauth2/openid/OpenIdHttpRequestWrapper.java
+++ b/full/src/main/java/de/ids_mannheim/korap/oauth2/openid/OpenIdHttpRequestWrapper.java
@@ -3,6 +3,7 @@
import java.net.URL;
import java.util.Enumeration;
import java.util.Map;
+import java.util.List;
import javax.servlet.http.HttpServletRequest;
@@ -16,19 +17,19 @@
*/
public class OpenIdHttpRequestWrapper extends HTTPRequest {
- private Map<String, String> params;
+ private Map<String, List<String>> params;
public OpenIdHttpRequestWrapper (Method method, URL url) {
super(method, url);
}
@Override
- public Map<String, String> getQueryParameters () {
+ public Map<String, List<String>> getQueryParameters () {
return this.params;
}
public void toHttpRequest (HttpServletRequest servletRequest,
- Map<String, String> map) throws ParseException {
+ Map<String, List<String>> map) throws ParseException {
this.params = map;
this.setClientIPAddress(servletRequest.getRemoteAddr());
diff --git a/full/src/main/java/de/ids_mannheim/korap/oauth2/openid/service/OpenIdAuthorizationService.java b/full/src/main/java/de/ids_mannheim/korap/oauth2/openid/service/OpenIdAuthorizationService.java
index 2d3ee33..87e71c3 100644
--- a/full/src/main/java/de/ids_mannheim/korap/oauth2/openid/service/OpenIdAuthorizationService.java
+++ b/full/src/main/java/de/ids_mannheim/korap/oauth2/openid/service/OpenIdAuthorizationService.java
@@ -6,8 +6,11 @@
import java.time.ZonedDateTime;
import java.util.HashSet;
import java.util.Map;
+import java.util.List;
import java.util.Set;
+import javax.ws.rs.core.MultivaluedMap;
+
import org.apache.commons.validator.routines.UrlValidator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -61,23 +64,24 @@
"redirect_uri is required", OAuth2Error.INVALID_REQUEST);
}
- public URI requestAuthorizationCode (Map<String, String> map,
+ public URI requestAuthorizationCode (MultivaluedMap<String, String> map,
String username, boolean isAuthentication,
ZonedDateTime authenticationTime)
throws KustvaktException, ParseException {
AuthorizationCode code = new AuthorizationCode();
URI redirectUri = null;
+
if (isAuthentication) {
AuthenticationRequest authRequest = null;
- authRequest = AuthenticationRequest.parse(map);
+ authRequest = AuthenticationRequest.parse((Map<String,List<String>>) map);
redirectUri = handleAuthenticationRequest(authRequest, code,
username, authenticationTime);
return new AuthenticationSuccessResponse(redirectUri, code, null,
null, authRequest.getState(), null, null).toURI();
}
else {
- AuthorizationRequest authzRequest = AuthorizationRequest.parse(map);
+ AuthorizationRequest authzRequest = AuthorizationRequest.parse((Map<String,List<String>>) map);
redirectUri = handleAuthorizationRequest(authzRequest, code,
username, authenticationTime, null);
return new AuthorizationSuccessResponse(redirectUri, code, null,
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2WithOpenIdController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2WithOpenIdController.java
index 5b3602e..a1e9fa7 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2WithOpenIdController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2WithOpenIdController.java
@@ -5,6 +5,7 @@
import java.net.URL;
import java.time.ZonedDateTime;
import java.util.Map;
+import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Consumes;
@@ -154,7 +155,7 @@
if (isAuthentication) {
authzService.checkRedirectUriParam(map);
}
- uri = authzService.requestAuthorizationCode(map, username,
+ uri = authzService.requestAuthorizationCode(form, username,
isAuthentication, authTime);
}
catch (ParseException e) {
@@ -191,7 +192,7 @@
try {
OpenIdHttpRequestWrapper httpRequest =
new OpenIdHttpRequestWrapper(method, url);
- httpRequest.toHttpRequest(servletRequest, map);
+ httpRequest.toHttpRequest(servletRequest, (Map<String, List<String>>) form);
TokenRequest tokenRequest = TokenRequest.parse(httpRequest);
AccessTokenResponse tokenResponse =