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: making sure the state param if available gets added to the logout URI
Date Mon, 27 Feb 2017 21:27:50 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 0468b8ec0 -> 6e453b98a


making sure the state param if available gets added to the logout URI


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

Branch: refs/heads/master
Commit: 6e453b98a92d240569264ab292700a035d5dd180
Parents: 0468b8e
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Feb 27 21:26:06 2017 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Feb 27 21:26:06 2017 +0000

----------------------------------------------------------------------
 .../apache/cxf/fediz/service/oidc/logout/LogoutService.java | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/6e453b98/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/logout/LogoutService.java
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/logout/LogoutService.java
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/logout/LogoutService.java
index ccd5f6a..43e551c 100644
--- a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/logout/LogoutService.java
+++ b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/logout/LogoutService.java
@@ -94,8 +94,12 @@ public class LogoutService {
         } else {
             uriStr = uris[0];
         }
-        
-        return URI.create(client.getProperties().get(uriStr));
+        UriBuilder ub = UriBuilder.fromUri(uriStr);
+        String state = params.getFirst(OAuthConstants.STATE);
+        if (state != null) {
+            ub.queryParam(OAuthConstants.STATE, state);
+        }
+        return ub.build();
     }
     
     private Client getClient(MultivaluedMap<String, String> params) {
@@ -118,7 +122,6 @@ public class LogoutService {
         ub.path(relativeIdpLogoutUri);
         ub.queryParam("wreply", getClientLogoutUri(client, params));
         ub.queryParam(OAuthConstants.CLIENT_ID, client.getClientId());
-
         return ub.build();
     }
 


Mime
View raw message