[java-idp-oidc] branch master updated: Updated oauth2-oidc-sdk dependency to the latest version.

Henri Mikkonen henri.mikkonen at iki.fi
Tue Feb 18 12:12:53 EST 2020


This is an automated email from the git hooks/post-receive script.

hjmikkon pushed a commit to branch master
in repository java-idp-oidc.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-oidc.git;a=commit;h=135808ad0b4bbf635dbc287dd4d7a5d61047a5d5

The following commit(s) were added to refs/heads/master by this push:
       new  135808a   Updated oauth2-oidc-sdk dependency to the latest version.
135808a is described below

commit 135808ad0b4bbf635dbc287dd4d7a5d61047a5d5
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Tue Feb 18 19:04:26 2020 +0200

    Updated oauth2-oidc-sdk dependency to the latest version.
    
    Changed our code to handle new method signatures and avoid using
    deprecated classes/methods.
---
 .../org/geant/idpextension/oidc/messaging/JSONErrorResponse.java  | 4 ++--
 .../geant/idpextension/oidc/messaging/JSONSuccessResponse.java    | 4 ++--
 idp-oidc-extension-distribution/src/assembly/dep.xml              | 1 +
 .../idpextension/oidc/profile/impl/BuildClientInformation.java    | 2 +-
 .../net/shibboleth/idp/flows/oidc/authorize/authorize-beans.xml   | 2 +-
 .../matcher/impl/AttributeInOIDCRequestedClaimsMatcherTest.java   | 3 +--
 pom.xml                                                           | 8 +-------
 7 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/idp-oidc-extension-api/src/main/java/org/geant/idpextension/oidc/messaging/JSONErrorResponse.java b/idp-oidc-extension-api/src/main/java/org/geant/idpextension/oidc/messaging/JSONErrorResponse.java
index ada1f75..bb7273a 100644
--- a/idp-oidc-extension-api/src/main/java/org/geant/idpextension/oidc/messaging/JSONErrorResponse.java
+++ b/idp-oidc-extension-api/src/main/java/org/geant/idpextension/oidc/messaging/JSONErrorResponse.java
@@ -19,9 +19,9 @@ package org.geant.idpextension.oidc.messaging;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
+import com.nimbusds.common.contenttype.ContentType;
 import com.nimbusds.oauth2.sdk.ErrorObject;
 import com.nimbusds.oauth2.sdk.ErrorResponse;
-import com.nimbusds.oauth2.sdk.http.CommonContentTypes;
 import com.nimbusds.oauth2.sdk.http.HTTPResponse;
 
 import net.minidev.json.JSONObject;
@@ -93,7 +93,7 @@ public class JSONErrorResponse implements ErrorResponse {
     @Override
     public HTTPResponse toHTTPResponse() {
         final HTTPResponse httpResponse = new HTTPResponse(error.getHTTPStatusCode());
-        httpResponse.setContentType(CommonContentTypes.APPLICATION_JSON);
+        httpResponse.setEntityContentType(ContentType.APPLICATION_JSON);
         if (cacheControl != null) {
             httpResponse.setCacheControl(cacheControl);
         }
diff --git a/idp-oidc-extension-api/src/main/java/org/geant/idpextension/oidc/messaging/JSONSuccessResponse.java b/idp-oidc-extension-api/src/main/java/org/geant/idpextension/oidc/messaging/JSONSuccessResponse.java
index 6532b4c..55b2583 100644
--- a/idp-oidc-extension-api/src/main/java/org/geant/idpextension/oidc/messaging/JSONSuccessResponse.java
+++ b/idp-oidc-extension-api/src/main/java/org/geant/idpextension/oidc/messaging/JSONSuccessResponse.java
@@ -19,8 +19,8 @@ package org.geant.idpextension.oidc.messaging;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
+import com.nimbusds.common.contenttype.ContentType;
 import com.nimbusds.oauth2.sdk.SuccessResponse;
-import com.nimbusds.oauth2.sdk.http.CommonContentTypes;
 import com.nimbusds.oauth2.sdk.http.HTTPResponse;
 
 import net.minidev.json.JSONObject;
@@ -73,7 +73,7 @@ public class JSONSuccessResponse implements SuccessResponse {
     @Override
     public HTTPResponse toHTTPResponse() {
         final HTTPResponse httpResponse = new HTTPResponse(HTTPResponse.SC_OK);
-        httpResponse.setContentType(CommonContentTypes.APPLICATION_JSON);
+        httpResponse.setEntityContentType(ContentType.APPLICATION_JSON);
         if (cacheControl != null) {
             httpResponse.setCacheControl(cacheControl);
         }
diff --git a/idp-oidc-extension-distribution/src/assembly/dep.xml b/idp-oidc-extension-distribution/src/assembly/dep.xml
index 07f1fda..b9f648b 100644
--- a/idp-oidc-extension-distribution/src/assembly/dep.xml
+++ b/idp-oidc-extension-distribution/src/assembly/dep.xml
@@ -26,6 +26,7 @@
                 <include>lang-tag-*.jar</include>
                 <include>gson-*.jar</include>
                 <include>idp-oidc-extension-api-*.jar</include>
+                <include>content-type-*.jar</include>
             </includes>
             <excludes>
                 <exclude>*test*.jar</exclude>
diff --git a/idp-oidc-extension-impl/src/main/java/org/geant/idpextension/oidc/profile/impl/BuildClientInformation.java b/idp-oidc-extension-impl/src/main/java/org/geant/idpextension/oidc/profile/impl/BuildClientInformation.java
index b733255..fd2494f 100644
--- a/idp-oidc-extension-impl/src/main/java/org/geant/idpextension/oidc/profile/impl/BuildClientInformation.java
+++ b/idp-oidc-extension-impl/src/main/java/org/geant/idpextension/oidc/profile/impl/BuildClientInformation.java
@@ -104,7 +104,7 @@ public class BuildClientInformation extends AbstractProfileAction {
         
         final OIDCClientInformation clientInformation = new OIDCClientInformation(clientId, new Date(), 
                 metadata, clientSecret);
-        final OIDCClientInformationResponse response = new OIDCClientInformationResponse(clientInformation);
+        final OIDCClientInformationResponse response = new OIDCClientInformationResponse(clientInformation, true);
         profileRequestContext.getOutboundMessageContext().setMessage(response);
         log.info("{} Client information successfully added to the outbound context", getLogPrefix());
         
diff --git a/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidc/authorize/authorize-beans.xml b/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidc/authorize/authorize-beans.xml
index a7b6cae..ceb83b0 100644
--- a/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidc/authorize/authorize-beans.xml
+++ b/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidc/authorize/authorize-beans.xml
@@ -342,7 +342,7 @@
                 <entry key="#{T(org.geant.idpextension.oidc.profile.OidcEventIds).INVALID_REDIRECT_URI}"
                     value="#{T(com.nimbusds.oauth2.sdk.OAuth2Error).INVALID_REQUEST}" />
                 <entry key="#{T(org.geant.idpextension.oidc.profile.OidcEventIds).INVALID_REQUEST_OBJECT}"
-                    value="#{T(com.nimbusds.openid.connect.sdk.OIDCError).INVALID_REQUEST_OBJECT}" />
+                    value="#{T(com.nimbusds.oauth2.sdk.OAuth2Error).INVALID_REQUEST_OBJECT}" />
                 <entry key="#{T(org.geant.idpextension.oidc.profile.OidcEventIds).INVALID_RESPONSE_TYPE}"
                     value="#{T(com.nimbusds.oauth2.sdk.OAuth2Error).UNSUPPORTED_RESPONSE_TYPE}" />
                 <entry key="#{T(net.shibboleth.idp.authn.AuthnEventIds).NO_PASSIVE}"
diff --git a/idp-oidc-extension-impl/src/test/java/org/geant/idpextension/oidc/attribute/filter/matcher/impl/AttributeInOIDCRequestedClaimsMatcherTest.java b/idp-oidc-extension-impl/src/test/java/org/geant/idpextension/oidc/attribute/filter/matcher/impl/AttributeInOIDCRequestedClaimsMatcherTest.java
index dc6f7bf..b798637 100644
--- a/idp-oidc-extension-impl/src/test/java/org/geant/idpextension/oidc/attribute/filter/matcher/impl/AttributeInOIDCRequestedClaimsMatcherTest.java
+++ b/idp-oidc-extension-impl/src/test/java/org/geant/idpextension/oidc/attribute/filter/matcher/impl/AttributeInOIDCRequestedClaimsMatcherTest.java
@@ -74,11 +74,10 @@ public class AttributeInOIDCRequestedClaimsMatcherTest {
         } else {
             msgCtx.setMessage(new AuthenticationRequest(new URI("htts://example.org"), ResponseType.getDefault(), null,
                     new Scope("openid"), new ClientID(), new URI("htts://example.org"), new State(), new Nonce(), null,
-                    null, 0, null, null, null, null, null, getClaimsRequest(idtoken, userinfo), null, null, null, null, null, userinfo, null));
+                    null, 0, null, null, null, null, null, getClaimsRequest(idtoken, userinfo), null, null, null, null, null, null, userinfo, null));
             respCtx.setRequestedClaims(getClaimsRequest(idtoken, userinfo));
             setMappedClaims(respCtx, idtoken, userinfo);
         }
-        
         // shortcut, may break the test
         filtercontext = prc.getSubcontext(AttributeFilterContext.class, true);
         ctx = new OIDCMetadataContext();
diff --git a/pom.xml b/pom.xml
index ced0954..fc35719 100644
--- a/pom.xml
+++ b/pom.xml
@@ -50,13 +50,7 @@
             <dependency>
                 <groupId>com.nimbusds</groupId>
                 <artifactId>oauth2-oidc-sdk</artifactId>
-                <version>6.5</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>com.sun.mail</groupId>
-                        <artifactId>javax.mail</artifactId>
-                    </exclusion>
-                </exclusions>
+                <version>7.0</version>
             </dependency>
             <dependency>
                 <groupId>org.geant</groupId>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list