@@ -0,0 +1,1897 @@
+// Licensed to the Apache Software Foundation (ASF) under one%0A// or more contributor license agreements.  See the NOTICE file%0A// distributed with this work for additional information%0A// regarding copyright ownership.  The ASF licenses this file%0A// to you under the Apache License, Version 2.0 (the%0A// %22License%22); you may not use this file except in compliance%0A// with the License.  You may obtain a copy of the License at%0A//%0A//   http://www.apache.org/licenses/LICENSE-2.0%0A//%0A// Unless required by applicable law or agreed to in writing,%0A// software distributed under the License is distributed on an%0A// %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY%0A// KIND, either express or implied.  See the License for the%0A// specific language governing permissions and limitations%0A// under the License.%0Apackage org.apache.cloudstack.saml;%0A%0Aimport com.cloud.utils.component.AdapterBase;%0Aimport org.apache.cloudstack.api.auth.PluggableAPIAuthenticator;%0Aimport org.apache.cloudstack.api.command.SAML2LoginAPIAuthenticatorCmd;%0Aimport org.apache.cloudstack.api.command.SAML2LogoutAPIAuthenticatorCmd;%0Aimport org.apache.log4j.Logger;%0Aimport org.springframework.stereotype.Component;%0A%0Aimport javax.ejb.Local;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A@Component%0A@Local(value = PluggableAPIAuthenticator.class)%0Apublic class SAML2AuthServiceImpl extends AdapterBase implements PluggableAPIAuthenticator %7B%0A    private static final Logger s_logger = Logger.getLogger(SAML2AuthServiceImpl.class);%0A%0A    protected SAML2AuthServiceImpl() %7B%0A        super();%0A    %7D%0A%0A    @Override%0A    public boolean start() %7B%0A        return true;%0A    %7D%0A%0A    @Override%0A    public List%3CClass%3C?%3E%3E getAuthCommands() %7B%0A        List%3CClass%3C?%3E%3E cmdList = new ArrayList%3CClass%3C?%3E%3E();%0A        cmdList.add(SAML2LoginAPIAuthenticatorCmd.class);%0A        cmdList.add(SAML2LogoutAPIAuthenticatorCmd.class);%0A        return cmdList;%0A    %7D%0A%7D%0A

Implement SAML2AuthServiceImpl which is a PluggableAPIAuthenticator