cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Updating OidcImplicitService to process IdToken
Date Fri, 05 Feb 2016 14:30:24 GMT
Repository: cxf
Updated Branches:
  refs/heads/master dcf440746 -> 9ffc542d0


Updating OidcImplicitService to process IdToken


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

Branch: refs/heads/master
Commit: 9ffc542d09419a602cd742535faf3f9e39f1af25
Parents: dcf4407
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri Feb 5 14:30:05 2016 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri Feb 5 14:30:05 2016 +0000

----------------------------------------------------------------------
 .../cxf/rs/security/oidc/idp/OidcImplicitService.java     | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/9ffc542d/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcImplicitService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcImplicitService.java
b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcImplicitService.java
index 01ae147..c13b89d 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcImplicitService.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcImplicitService.java
@@ -25,6 +25,8 @@ import java.util.List;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
 
+import org.apache.cxf.rs.security.jose.jwt.JoseJwtProducer;
+import org.apache.cxf.rs.security.jose.jwt.JwtToken;
 import org.apache.cxf.rs.security.oauth2.common.Client;
 import org.apache.cxf.rs.security.oauth2.common.OAuthError;
 import org.apache.cxf.rs.security.oauth2.common.OAuthPermission;
@@ -43,6 +45,7 @@ public class OidcImplicitService extends ImplicitGrantService {
     private static final String ID_TOKEN_RESPONSE_TYPE = "id_token";
     private static final String ID_TOKEN_AND_AT_RESPONSE_TYPE = "id_token token";
     private boolean skipAuthorizationWithOidcScope;
+    private JoseJwtProducer idTokenHandler;
     
     public OidcImplicitService() {
         super(new HashSet<String>(Arrays.asList(ID_TOKEN_RESPONSE_TYPE,
@@ -112,10 +115,15 @@ public class OidcImplicitService extends ImplicitGrantService {
             OidcUserSubject sub = (OidcUserSubject)subject;
             IdToken idToken = new IdToken(sub.getIdToken());
             idToken.setNonce(state.getNonce());
-            return null; //super.processJwt(new JwtToken(idToken));
+            JoseJwtProducer processor = idTokenHandler == null ? new JoseJwtProducer() :
null; 
+            return processor.processJwt(new JwtToken(idToken));
         } else {
             return null;
         }
     }
+
+    public void setIdTokenJoseHandler(JoseJwtProducer idTokenJoseHandler) {
+        this.idTokenHandler = idTokenJoseHandler;
+    }
     
 }


Mime
View raw message