Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A2CE211892 for ; Thu, 28 Aug 2014 17:58:20 +0000 (UTC) Received: (qmail 30385 invoked by uid 500); 28 Aug 2014 17:58:06 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 30345 invoked by uid 500); 28 Aug 2014 17:58:06 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 29282 invoked by uid 99); 28 Aug 2014 17:58:06 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Aug 2014 17:58:06 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2E2FFA04E18; Thu, 28 Aug 2014 17:58:06 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bhaisaab@apache.org To: commits@cloudstack.apache.org Date: Thu, 28 Aug 2014 17:58:43 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [39/50] git commit: updated refs/heads/master to 97ed5ff SAML2LogoutAPIAuthenticatorCmd: if session is null, redirect to login page If session is null, probably logout (local) happened removing the name id and session index which is needed for global logout. The limitation by design is that local logout will void possibility of global logout. To globally logout, one use the SLO api which would logout locally as well. Signed-off-by: Rohit Yadav Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0402f68b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0402f68b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0402f68b Branch: refs/heads/master Commit: 0402f68b127df1ae7bdb0b299e462711db8d8030 Parents: de4e74b Author: Rohit Yadav Authored: Tue Aug 26 23:06:17 2014 +0200 Committer: Rohit Yadav Committed: Thu Aug 28 19:45:26 2014 +0200 ---------------------------------------------------------------------- .../api/command/SAML2LogoutAPIAuthenticatorCmd.java | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0402f68b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmd.java ---------------------------------------------------------------------- diff --git a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmd.java b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmd.java index 5b94766..4fa7fb3 100644 --- a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmd.java +++ b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmd.java @@ -90,6 +90,14 @@ public class SAML2LogoutAPIAuthenticatorCmd extends BaseCmd implements APIAuthen response.setResponseName(getCommandName()); String responseString = ApiResponseSerializer.toSerializedString(response, responseType); + if (session == null) { + try { + resp.sendRedirect(_configDao.getValue(Config.SAMLCloudStackRedirectionUrl.key())); + } catch (IOException ignored) { + } + return responseString; + } + try { DefaultBootstrap.bootstrap(); } catch (ConfigurationException | FactoryConfigurationError e) {