Class AuthenticationManager.Builder

java.lang.Object
org.wildfly.elytron.web.undertow.server.servlet.AuthenticationManager.Builder
Enclosing class:
AuthenticationManager

public static class AuthenticationManager.Builder extends Object
Author:
Darran Lofthouse
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setHttpAuthenticationFactory

      public AuthenticationManager.Builder setHttpAuthenticationFactory(org.wildfly.security.auth.server.http.HttpAuthenticationFactory httpAuthenticationFactory)
      Set the HttpAuthenticationFactory to be used to secure the deployment. Only one of HttpAuthenticationFactory and SecurityDomain should be set
      Parameters:
      httpAuthenticationFactory - the HttpAuthenticationFactory to be used to secure the deployment.
      Returns:
      this AuthenticationManager.Builder
      Throws:
      IllegalStateException - If a SecurityDomain has already been set.
    • setHttpAuthenticationFactory

      @Deprecated public AuthenticationManager.Builder setHttpAuthenticationFactory(org.wildfly.security.auth.server.HttpAuthenticationFactory httpAuthenticationFactory)
      Deprecated.
    • setSecurityDomain

      public AuthenticationManager.Builder setSecurityDomain(org.wildfly.security.auth.server.SecurityDomain securityDomain)
      Set the SecurityDomain to be used to secure the deployment. Only one of HttpAuthenticationFactory and SecurityDomain should be set
      Parameters:
      securityDomain - the SecurityDomain to be used to secure the deployment.
      Returns:
      this AuthenticationManager.Builder
      Throws:
      IllegalStateException - If a HttpAuthenticationFactory has already been set.
    • setAuthorizationManager

      public AuthenticationManager.Builder setAuthorizationManager(io.undertow.servlet.api.AuthorizationManager authorizationManager)
      Set an AuthorizationManager for the deployment, if none is provided the default Elytron AuthorizationManager will be used instead.
      Parameters:
      authorizationManagerSupplier - an AuthorizationManager for the deployment.
      Returns:
      this AuthenticationManager.Builder
    • setOverrideDeploymentConfig

      public AuthenticationManager.Builder setOverrideDeploymentConfig(boolean overrideDeploymentConfig)
      Sets if the deployments authentication mechanisms should be overridden, where they are overridden all of the mechanisms from the HttpAuthenticationFactory will be used with no additional filtering.
      Parameters:
      overrideDeploymentConfig - should the mechanisms specified in the deployment be overridden.
      Returns:
      this AuthenticationManager.Builder
    • setHttpAuthenticationFactoryTransformer

      public AuthenticationManager.Builder setHttpAuthenticationFactoryTransformer(UnaryOperator<org.wildfly.security.http.HttpServerAuthenticationMechanismFactory> httpAuthenticationFactoryTransformer)
      Sets a UnaryOperator to transform the HttpAuthenticationFactory.
      Parameters:
      httpAuthenticationFactoryTransformer - a UnaryOperator to transform the HttpAuthenticationFactory
      Returns:
      this AuthenticationManager.Builder
    • setRunAsMapper

      public AuthenticationManager.Builder setRunAsMapper(Function<String, org.jboss.metadata.javaee.jboss.RunAsIdentityMetaData> runAsMapper)
      Set the run as mapper for identfying run RunAsIdentityMetaData.
      Parameters:
      runAsMapper - the run as mapper for identfying run RunAsIdentityMetaData.
      Returns:
      this AuthenticationManager.Builder
    • setEnableJaspi

      public AuthenticationManager.Builder setEnableJaspi(boolean enableJaspi)
      Set if JASPI authentication should be enabled.
      Parameters:
      enableJaspi - if JASPI authentication should be enabled.
      Returns:
      this AuthenticationManager.Builder
    • setIntegratedJaspi

      public AuthenticationManager.Builder setIntegratedJaspi(boolean integratedJaspi)
      Set if JASPI authentication should be integrated with the SecurityDomain, if not integrated AdHoc identities will be created instead from the domain.
      Parameters:
      integratedJaspi - if JASPI authentication should be integrated with the SecurityDomain
      Returns:
      this AuthenticationManager.Builder
    • setIdentityCacheSupplier

      public AuthenticationManager.Builder setIdentityCacheSupplier(BiFunction<org.wildfly.security.http.HttpExchangeSpi, String, org.wildfly.security.cache.IdentityCache> identityCacheSupplier)
      Set a BiFunction which can take a HttpExchangeSpi instance and the authentication mechanism name and convert it to an IdentityCache, this allows for pluggable caching strategies such as SSO.
      Parameters:
      identityCacheSupplier - - A supplier of IdentityCache instances for the current HttpExchangeSpi.
      Returns:
      this AuthenticationManager.Builder
    • build

      public AuthenticationManager build()
      Assemble the supplied configuration into a complete AuthenticationManager.
      Returns:
      a configured AuthenticationManager.