package com.airlock.iam.saml2.application.configuration;

import com.airlock.iam.plugin.api.annotation.config.Plugin;
import com.airlock.iam.plugin.api.annotation.license.PluginLicenseRestriction;
import com.airlock.iam.saml2.infrastructure.plugin.SamlNoCertKeyProviderImpl;
import com.sun.identity.saml.xmlsig.KeyProvider;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.File;

@Plugin(
   description = "Keystore provider implementation which can only be used on the SP side if the SP does not create any signatures at all (no SP-initiated SSO can thus be used).<br/>This means that no keystore needs to be created in such a minimal setup.",
   displayName = "SAML No Cert Key Provider"
)
@PluginLicenseRestriction(moduleAffiliation = {"SamlIdp", "SamlSp"})
public class SamlNoCertKeyProvider implements SamlFederationConfig.ISamlKeystoreProvider {
   @Override
   public File getKeystore() {
      return new File("");
   }

   @Override
   public String getKeystoreType() {
      return "";
   }

   @Override
   public File getKeystorePasswordFile() {
      return new File("");
   }

   @Override
   public File getKeystorePrivateKeyPasswordFile() {
      return new File("");
   }

   @Override
   public Class<? extends KeyProvider> getImplementationClass() {
      return SamlNoCertKeyProviderImpl.class;
   }

   @SuppressFBWarnings(justification = "generated code")
   public static SamlNoCertKeyProvider.SamlNoCertKeyProviderBuilder builder() {
      return new SamlNoCertKeyProvider.SamlNoCertKeyProviderBuilder();
   }

   @SuppressFBWarnings(justification = "generated code")
   public static class SamlNoCertKeyProviderBuilder {
      @SuppressFBWarnings(justification = "generated code")
      SamlNoCertKeyProviderBuilder() {
      }

      @SuppressFBWarnings(justification = "generated code")
      public SamlNoCertKeyProvider build() {
         return new SamlNoCertKeyProvider();
      }

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "SamlNoCertKeyProvider.SamlNoCertKeyProviderBuilder()";
      }
   }
}
