cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf-fediz git commit: Adding a name claim hint to the logout token
Date Mon, 28 Aug 2017 10:44:40 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/1.4.x-fixes e6a60ff60 -> d2f889c17


Adding a name claim hint to the logout token


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

Branch: refs/heads/1.4.x-fixes
Commit: d2f889c177204165d834dbcbc36f70910c55ce8f
Parents: e6a60ff
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Aug 28 11:44:22 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Aug 28 11:44:22 2017 +0100

----------------------------------------------------------------------
 .../fediz/service/oidc/logout/BackChannelLogoutHandler.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/d2f889c1/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/logout/BackChannelLogoutHandler.java
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/logout/BackChannelLogoutHandler.java
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/logout/BackChannelLogoutHandler.java
index e64610f..2283bc8 100644
--- a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/logout/BackChannelLogoutHandler.java
+++ b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/logout/BackChannelLogoutHandler.java
@@ -88,8 +88,12 @@ public class BackChannelLogoutHandler extends JoseJwtProducer {
         claims.setAudience(client.getClientId());
         claims.setIssuedAt(System.currentTimeMillis() / 1000);
         claims.setTokenId(Base64UrlUtility.encode(CryptoUtils.generateSecureRandomBytes(16)));
-        claims.setProperty(EVENTS_PROPERTY, 
+        claims.setClaim(EVENTS_PROPERTY, 
                 Collections.singletonMap(BACK_CHANNEL_LOGOUT_EVENT, Collections.emptyMap()));
+        if (idToken.getName() != null) {
+            claims.setClaim(IdToken.NAME_CLAIM, idToken.getName());    
+        }
+        
         final String logoutToken = super.processJwt(new JwtToken(claims));
         executorService.submit(new Runnable() {
 


Mime
View raw message