You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2017/12/08 10:57:35 UTC

[2/5] kylin git commit: KYLIN-2959 SAML logout issue

KYLIN-2959 SAML logout issue

Signed-off-by: shaofengshi <sh...@apache.org>


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

Branch: refs/heads/master
Commit: e0d8dda58819786076d028d4ba0a571dddb8afe9
Parents: 24f7e62
Author: liapan <li...@ebay.com>
Authored: Fri Dec 8 11:36:35 2017 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Fri Dec 8 18:57:29 2017 +0800

----------------------------------------------------------------------
 server/src/main/resources/kylinSecurity.xml | 1 -
 webapp/app/js/controllers/page.js           | 8 +++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/e0d8dda5/server/src/main/resources/kylinSecurity.xml
----------------------------------------------------------------------
diff --git a/server/src/main/resources/kylinSecurity.xml b/server/src/main/resources/kylinSecurity.xml
index 364c487..5887b47 100644
--- a/server/src/main/resources/kylinSecurity.xml
+++ b/server/src/main/resources/kylinSecurity.xml
@@ -358,7 +358,6 @@
         <!-- Handler for successful logout -->
         <bean id="successLogoutHandler"
               class="org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler">
-            <property name="defaultTargetUrl" value="/login"/>
         </bean>
 
         <!-- Logger for SAML messages and events -->

http://git-wip-us.apache.org/repos/asf/kylin/blob/e0d8dda5/webapp/app/js/controllers/page.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/page.js b/webapp/app/js/controllers/page.js
index 575f455..0b5ded7 100644
--- a/webapp/app/js/controllers/page.js
+++ b/webapp/app/js/controllers/page.js
@@ -50,8 +50,14 @@ KylinApp.controller('PageCtrl', function ($scope, $q, AccessService, $modal, $lo
   $scope.logout = function () {
     ProjectModel.clear();
     $rootScope.userAction.islogout = true;
+    var logoutURL = Config.service.base;
+    if(kylinConfig.getProperty('kylin.security.profile') === 'saml') {
+      logoutURL += 'saml/logout';
+    } else {
+      logoutURL += 'j_spring_security_logout';
+    }
     $scope.$emit('event:logoutRequest');
-    $http.get(Config.service.base + 'j_spring_security_logout').success(function () {
+    $http.get(logoutURL).success(function () {
       UserService.setCurUser({});
       $scope.username = $scope.password = null;
       $location.path('/login');