From 784288eaaba7eec6db18f728893f7bc382b53550 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Sat, 30 Aug 2014 14:32:54 +0200 Subject: [PATCH] SAML2AuthManagerImpl: let the component return true on start - Return super.true() even if plugin is not enabled - Return empty list when getCommands is called Signed-off-by: Rohit Yadav --- .../apache/cloudstack/saml/SAML2AuthManagerImpl.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAML2AuthManagerImpl.java b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAML2AuthManagerImpl.java index 8480c0e57c0..aa063203877 100644 --- a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAML2AuthManagerImpl.java +++ b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAML2AuthManagerImpl.java @@ -71,7 +71,10 @@ public class SAML2AuthManagerImpl extends AdapterBase implements SAML2AuthManage @Override public boolean start() { - return isSAMLPluginEnabled() && setup(); + if (isSAMLPluginEnabled()) { + setup(); + } + return super.start(); } private boolean setup() { @@ -147,10 +150,10 @@ public class SAML2AuthManagerImpl extends AdapterBase implements SAML2AuthManage @Override public List> getAuthCommands() { - if (!isSAMLPluginEnabled()) { - return null; - } List> cmdList = new ArrayList>(); + if (!isSAMLPluginEnabled()) { + return cmdList; + } cmdList.add(SAML2LoginAPIAuthenticatorCmd.class); cmdList.add(SAML2LogoutAPIAuthenticatorCmd.class); cmdList.add(GetServiceProviderMetaDataCmd.class);