cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Back channel property registration
Date Wed, 31 May 2017 16:25:06 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 382985e9c -> 27217faed


Back channel property registration


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

Branch: refs/heads/master
Commit: 27217faed4b80009ddc7942e6d7d453f4a864126
Parents: 382985e
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed May 31 17:24:51 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed May 31 17:24:51 2017 +0100

----------------------------------------------------------------------
 .../oidc/idp/OidcDynamicRegistrationService.java | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/27217fae/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcDynamicRegistrationService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcDynamicRegistrationService.java
b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcDynamicRegistrationService.java
index 388c92e..af5d7b9 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcDynamicRegistrationService.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcDynamicRegistrationService.java
@@ -27,22 +27,27 @@ import org.apache.cxf.rs.security.oauth2.services.ClientRegistrationResponse;
 import org.apache.cxf.rs.security.oauth2.services.DynamicRegistrationService;
 
 public class OidcDynamicRegistrationService extends DynamicRegistrationService {
-    private static final String RP_INITIATED_LOGOUT_URIS = "post_logout_redirect_uris";
+    private static final String POST_LOGOUT_LOGOUT_URIS = "post_logout_redirect_uris";
+    private static final String BACK_CHANNEL_LOGOUT_URI = "backchannel_logout_uri";
     private boolean protectIdTokenWithClientSecret;
 
     @Override
     protected Client createNewClient(ClientRegistration request) {
         Client client = super.createNewClient(request);
-        List<String> logoutUris = request.getListStringProperty(RP_INITIATED_LOGOUT_URIS);
-        if (logoutUris != null) {
+        List<String> postLogoutUris = request.getListStringProperty(POST_LOGOUT_LOGOUT_URIS);
+        if (postLogoutUris != null) {
             StringBuilder sb = new StringBuilder();
-            for (String uri : logoutUris) {
+            for (String uri : postLogoutUris) {
                 if (sb.length() > 0) {
                     sb.append(" ");
                 }
                 sb.append(uri);
             }
-            client.getProperties().put(RP_INITIATED_LOGOUT_URIS, sb.toString());
+            client.getProperties().put(POST_LOGOUT_LOGOUT_URIS, sb.toString());
+        }
+        String backChannelLogoutUri = request.getStringProperty(BACK_CHANNEL_LOGOUT_URI);
+        if (backChannelLogoutUri != null) {
+            client.getProperties().put(BACK_CHANNEL_LOGOUT_URI, backChannelLogoutUri);
         }
         return client;
     }
@@ -55,13 +60,13 @@ public class OidcDynamicRegistrationService extends DynamicRegistrationService
{
     @Override
     protected ClientRegistration fromClientToClientRegistration(Client client) {
         ClientRegistration resp = super.fromClientToClientRegistration(client);
-        String logoutUris = client.getProperties().get(RP_INITIATED_LOGOUT_URIS);
+        String logoutUris = client.getProperties().get(POST_LOGOUT_LOGOUT_URIS);
         if (logoutUris != null) {
             List<String> list = new LinkedList<String>();
             for (String s : logoutUris.split(" ")) { 
                 list.add(s);
             }
-            resp.setProperty(RP_INITIATED_LOGOUT_URIS, list);
+            resp.setProperty(POST_LOGOUT_LOGOUT_URIS, list);
         }
         return resp;
     }


Mime
View raw message