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:45:58 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master bac2ff680 -> 8bd1906e4


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/8bd1906e
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/8bd1906e
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/8bd1906e

Branch: refs/heads/master
Commit: 8bd1906e4d0f5a5a457c14e7f29ee8f533527d89
Parents: bac2ff6
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:45:38 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/8bd1906e/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