cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Adding subject copy constructors
Date Mon, 07 Dec 2015 12:42:00 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 67042418e -> 4c687895d


Adding subject copy constructors


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

Branch: refs/heads/3.1.x-fixes
Commit: 4c687895d918deb69cba4f50e62a3746a71b4130
Parents: 6704241
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Dec 7 12:40:42 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Dec 7 12:41:42 2015 +0000

----------------------------------------------------------------------
 .../apache/cxf/rs/security/oauth2/common/UserSubject.java   | 7 +++++++
 .../apache/cxf/rs/security/oidc/idp/OidcUserSubject.java    | 9 +++++++++
 2 files changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/4c687895/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/UserSubject.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/UserSubject.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/UserSubject.java
index b3990c3..ec4f4b6 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/UserSubject.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/UserSubject.java
@@ -64,6 +64,13 @@ public class UserSubject implements Serializable {
         this.roles = roles;
     }
     
+    public UserSubject(UserSubject sub) {
+        this(sub.getLogin(), sub.getId(), sub.getRoles());
+        this.properties = sub.getProperties();
+        this.am = sub.getAuthenticationMethod();
+        
+    }
+    
     /**
      * Return the user login name
      * @return the login name

http://git-wip-us.apache.org/repos/asf/cxf/blob/4c687895/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcUserSubject.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcUserSubject.java
b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcUserSubject.java
index 6c9690b..d9dd955 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcUserSubject.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcUserSubject.java
@@ -25,6 +25,15 @@ public class OidcUserSubject extends UserSubject {
     
     private static final long serialVersionUID = 8806727177012442229L;
     private IdToken idToken;
+    
+    public OidcUserSubject() {
+        
+    }
+    
+    public OidcUserSubject(UserSubject sub) {
+        super(sub);
+    }
+    
     public IdToken getIdToken() {
         return idToken;
     }


Mime
View raw message