Class AuthenticationManager.Builder
java.lang.Object
org.wildfly.elytron.web.undertow.server.servlet.AuthenticationManager.Builder
- Enclosing class:
AuthenticationManager
- Author:
- Darran Lofthouse
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Assemble the supplied configuration into a completeAuthenticationManager.setAuthorizationManager(io.undertow.servlet.api.AuthorizationManager authorizationManager) Set anAuthorizationManagerfor the deployment, if none is provided the default Elytron AuthorizationManager will be used instead.setEnableJaspi(boolean enableJaspi) Set if JASPI authentication should be enabled.setHttpAuthenticationFactory(org.wildfly.security.auth.server.http.HttpAuthenticationFactory httpAuthenticationFactory) Set theHttpAuthenticationFactoryto be used to secure the deployment.setHttpAuthenticationFactory(org.wildfly.security.auth.server.HttpAuthenticationFactory httpAuthenticationFactory) Deprecated.setHttpAuthenticationFactoryTransformer(UnaryOperator<org.wildfly.security.http.HttpServerAuthenticationMechanismFactory> httpAuthenticationFactoryTransformer) Sets aUnaryOperatorto transform theHttpAuthenticationFactory.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.setIntegratedJaspi(boolean integratedJaspi) Set if JASPI authentication should be integrated with theSecurityDomain, if not integrated AdHoc identities will be created instead from the domain.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.setRunAsMapper(Function<String, org.jboss.metadata.javaee.jboss.RunAsIdentityMetaData> runAsMapper) Set the run as mapper for identfying runRunAsIdentityMetaData.setSecurityDomain(org.wildfly.security.auth.server.SecurityDomain securityDomain) Set theSecurityDomainto be used to secure the deployment.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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
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
Set if JASPI authentication should be enabled.- Parameters:
enableJaspi- if JASPI authentication should be enabled.- Returns:
- this
AuthenticationManager.Builder
-
setIntegratedJaspi
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
Assemble the supplied configuration into a completeAuthenticationManager.- Returns:
- a configured
AuthenticationManager.
-