cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Minor updates to the default UserInfo creation code
Date Wed, 24 Feb 2016 12:23:25 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 62b79cc46 -> 9db45329a


Minor updates to the default UserInfo creation code


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

Branch: refs/heads/3.1.x-fixes
Commit: 9db45329a9bfb1cbbe949f178028797bbd7116b9
Parents: 62b79cc
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Feb 24 12:22:15 2016 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Feb 24 12:23:09 2016 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/rs/security/oidc/idp/UserInfoService.java   | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/9db45329/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/UserInfoService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/UserInfoService.java
b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/UserInfoService.java
index 5edf228..7c4ec07 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/UserInfoService.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/UserInfoService.java
@@ -83,6 +83,9 @@ public class UserInfoService extends OAuthServerJoseJwtProducer {
             userInfo.setIssuer(idToken.getIssuer());
             userInfo.setAudience(idToken.getAudience());
         }
+        if (idToken.getPreferredUserName() != null) {
+            userInfo.setPreferredUserName(idToken.getPreferredUserName());
+        }
         if (idToken.getName() != null) {
             userInfo.setName(idToken.getName());
         }
@@ -95,6 +98,9 @@ public class UserInfoService extends OAuthServerJoseJwtProducer {
         if (idToken.getEmail() != null) {
             userInfo.setEmail(idToken.getEmail());
         }
+        if (idToken.getNickName() != null) {
+            userInfo.setNickName(idToken.getNickName());
+        }
         //etc
         return userInfo;
     }


Mime
View raw message