Skip to content

Commit 784288e

Browse files
committed
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 <rohit.yadav@shapeblue.com>
1 parent 2bff595 commit 784288e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAML2AuthManagerImpl.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ public class SAML2AuthManagerImpl extends AdapterBase implements SAML2AuthManage
7171

7272
@Override
7373
public boolean start() {
74-
return isSAMLPluginEnabled() && setup();
74+
if (isSAMLPluginEnabled()) {
75+
setup();
76+
}
77+
return super.start();
7578
}
7679

7780
private boolean setup() {
@@ -147,10 +150,10 @@ private boolean setup() {
147150

148151
@Override
149152
public List<Class<?>> getAuthCommands() {
153+
List<Class<?>> cmdList = new ArrayList<Class<?>>();
150154
if (!isSAMLPluginEnabled()) {
151-
return null;
155+
return cmdList;
152156
}
153-
List<Class<?>> cmdList = new ArrayList<Class<?>>();
154157
cmdList.add(SAML2LoginAPIAuthenticatorCmd.class);
155158
cmdList.add(SAML2LogoutAPIAuthenticatorCmd.class);
156159
cmdList.add(GetServiceProviderMetaDataCmd.class);

0 commit comments

Comments
 (0)