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
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AuthenticationManagerbuild()Assemble the supplied configuration into a completeAuthenticationManager.AuthenticationManager.BuildersetAuthorizationManager(io.undertow.servlet.api.AuthorizationManager authorizationManager)Set anAuthorizationManagerfor the deployment, if none is provided the default Elytron AuthorizationManager will be used instead.AuthenticationManager.BuildersetEnableJaspi(boolean enableJaspi)Set if JASPI authentication should be enabled.AuthenticationManager.BuildersetHttpAuthenticationFactory(org.wildfly.security.auth.server.http.HttpAuthenticationFactory httpAuthenticationFactory)Set theHttpAuthenticationFactoryto be used to secure the deployment.AuthenticationManager.BuildersetHttpAuthenticationFactory(org.wildfly.security.auth.server.HttpAuthenticationFactory httpAuthenticationFactory)Deprecated.AuthenticationManager.BuildersetHttpAuthenticationFactoryTransformer(UnaryOperator<org.wildfly.security.http.HttpServerAuthenticationMechanismFactory> httpAuthenticationFactoryTransformer)Sets aUnaryOperatorto transform theHttpAuthenticationFactory.AuthenticationManager.BuildersetIdentityCacheSupplier(BiFunction<org.wildfly.security.http.HttpExchangeSpi,String,org.wildfly.security.cache.IdentityCache> identityCacheSupplier)Set aBiFunctionwhich can take aHttpExchangeSpiinstance and the authentication mechanism name and convert it to anIdentityCache, this allows for pluggable caching strategies such as SSO.AuthenticationManager.BuildersetIntegratedJaspi(boolean integratedJaspi)Set if JASPI authentication should be integrated with theSecurityDomain, if not integrated AdHoc identities will be created instead from the domain.AuthenticationManager.BuildersetOverrideDeploymentConfig(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.AuthenticationManager.BuildersetRunAsMapper(Function<String,org.jboss.metadata.javaee.jboss.RunAsIdentityMetaData> runAsMapper)Set the run as mapper for identfying runRunAsIdentityMetaData.AuthenticationManager.BuildersetSecurityDomain(org.wildfly.security.auth.server.SecurityDomain securityDomain)Set theSecurityDomainto be used to secure the deployment.
-
-
-
Method Detail
-
setHttpAuthenticationFactory
public AuthenticationManager.Builder setHttpAuthenticationFactory(org.wildfly.security.auth.server.http.HttpAuthenticationFactory httpAuthenticationFactory)
Set theHttpAuthenticationFactoryto be used to secure the deployment. Only one ofHttpAuthenticationFactoryandSecurityDomainshould be set- Parameters:
httpAuthenticationFactory- theHttpAuthenticationFactoryto be used to secure the deployment.- Returns:
- this
AuthenticationManager.Builder - Throws:
IllegalStateException- If aSecurityDomainhas 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 theSecurityDomainto be used to secure the deployment. Only one ofHttpAuthenticationFactoryandSecurityDomainshould be set- Parameters:
securityDomain- theSecurityDomainto be used to secure the deployment.- Returns:
- this
AuthenticationManager.Builder - Throws:
IllegalStateException- If aHttpAuthenticationFactoryhas already been set.
-
setAuthorizationManager
public AuthenticationManager.Builder setAuthorizationManager(io.undertow.servlet.api.AuthorizationManager authorizationManager)
Set anAuthorizationManagerfor the deployment, if none is provided the default Elytron AuthorizationManager will be used instead.- Parameters:
authorizationManagerSupplier- anAuthorizationManagerfor 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 aUnaryOperatorto transform theHttpAuthenticationFactory.- Parameters:
httpAuthenticationFactoryTransformer- aUnaryOperatorto transform theHttpAuthenticationFactory- 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 runRunAsIdentityMetaData.- Parameters:
runAsMapper- the run as mapper for identfying runRunAsIdentityMetaData.- 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 theSecurityDomain, if not integrated AdHoc identities will be created instead from the domain.- Parameters:
integratedJaspi- if JASPI authentication should be integrated with theSecurityDomain- Returns:
- this
AuthenticationManager.Builder
-
setIdentityCacheSupplier
public AuthenticationManager.Builder setIdentityCacheSupplier(BiFunction<org.wildfly.security.http.HttpExchangeSpi,String,org.wildfly.security.cache.IdentityCache> identityCacheSupplier)
Set aBiFunctionwhich can take aHttpExchangeSpiinstance and the authentication mechanism name and convert it to anIdentityCache, this allows for pluggable caching strategies such as SSO.- Parameters:
identityCacheSupplier- - A supplier ofIdentityCacheinstances for the currentHttpExchangeSpi.- Returns:
- this
AuthenticationManager.Builder
-
build
public AuthenticationManager build()
Assemble the supplied configuration into a completeAuthenticationManager.- Returns:
- a configured
AuthenticationManager.
-
-