cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-7152] Minor update to support multivalued response types better
Date Wed, 30 Nov 2016 16:53:19 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 8d80096c5 -> 0a39148c8


[CXF-7152] Minor update to support multivalued response types better


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/0a39148c
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0a39148c
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0a39148c

Branch: refs/heads/3.1.x-fixes
Commit: 0a39148c8324e4772ecfa2607f663cb1ae835b2d
Parents: 8d80096
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Nov 30 16:52:24 2016 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Nov 30 16:53:07 2016 +0000

----------------------------------------------------------------------
 .../oauth2/common/AbstractFormImplicitResponse.java      | 11 +++++++++++
 .../oauth2/services/AbstractImplicitGrantService.java    |  1 +
 .../cxf/rs/security/oidc/idp/FormIdTokenResponse.java    |  7 +++----
 3 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/0a39148c/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/AbstractFormImplicitResponse.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/AbstractFormImplicitResponse.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/AbstractFormImplicitResponse.java
index 3fa841f..6244faa 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/AbstractFormImplicitResponse.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/AbstractFormImplicitResponse.java
@@ -18,11 +18,14 @@
  */
 package org.apache.cxf.rs.security.oauth2.common;
 
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 public abstract class AbstractFormImplicitResponse {
     private String responseType;
     private String redirectUri;
     private String state;
+    private Map<String, String> parameters = new LinkedHashMap<String, String>();
     public String getRedirectUri() {
         return redirectUri;
     }
@@ -45,4 +48,12 @@ public abstract class AbstractFormImplicitResponse {
     public void setState(String state) {
         this.state = state;
     }
+
+    public Map<String, String> getParameters() {
+        return parameters;
+    }
+
+    public void setParameters(Map<String, String> parameters) {
+        this.parameters = parameters;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/0a39148c/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractImplicitGrantService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractImplicitGrantService.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractImplicitGrantService.java
index 75966fb..8606769 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractImplicitGrantService.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractImplicitGrantService.java
@@ -127,6 +127,7 @@ public abstract class AbstractImplicitGrantService extends RedirectionBasedGrant
         bean.setAccessToken(clientToken.getTokenKey());
         bean.setAccessTokenType(clientToken.getTokenType());
         bean.setAccessTokenExpiresIn(clientToken.getExpiresIn());
+        bean.getParameters().putAll(clientToken.getParameters());
         return bean;
     }
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/0a39148c/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/FormIdTokenResponse.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/FormIdTokenResponse.java
b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/FormIdTokenResponse.java
index 8b53a1b..41f28ff 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/FormIdTokenResponse.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/FormIdTokenResponse.java
@@ -19,15 +19,14 @@
 package org.apache.cxf.rs.security.oidc.idp;
 
 import org.apache.cxf.rs.security.oauth2.common.AbstractFormImplicitResponse;
+import org.apache.cxf.rs.security.oidc.utils.OidcUtils;
 
 public class FormIdTokenResponse extends AbstractFormImplicitResponse {
-    private String idToken;
-
     public String getIdToken() {
-        return idToken;
+        return (String)getParameters().get(OidcUtils.ID_TOKEN);
     }
 
     public void setIdToken(String idToken) {
-        this.idToken = idToken;
+        getParameters().put(OidcUtils.ID_TOKEN, idToken);
     }
 }


Mime
View raw message