Package org.wildfly.security.auth.jaspi
Class JaspiConfigurationBuilder
- java.lang.Object
-
- org.wildfly.security.auth.jaspi.JaspiConfigurationBuilder
-
public final class JaspiConfigurationBuilder extends Object
A builder API to assemble JASPIC configuration.- Author:
- Darran Lofthouse
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JaspiConfigurationBuilderaddAuthModuleFactory(Supplier<javax.security.auth.message.module.ServerAuthModule> serverAuthModuleFactory)Add aSupplierto be used to create aServerAuthModuleinstance for this message layer and application context combination.JaspiConfigurationBuilderaddAuthModuleFactory(Supplier<javax.security.auth.message.module.ServerAuthModule> serverAuthModuleFactory, Flag flag, Map options)Add aSupplierto be used to create aServerAuthModuleinstance for this message layer and application context combination.static JaspiConfigurationBuilderbuilder(String messageLayer, String applicationContext)Stringregister()Register the assembled configuration against the system wideAuthConfigFactory.Stringregister(javax.security.auth.message.config.AuthConfigFactory authConfigFactory)Register the assembled configuration against the suppliedAuthConfigFactory.JaspiConfigurationBuildersetDescription(String description)Set the description to be used for the provider once registered.
-
-
-
Method Detail
-
setDescription
public JaspiConfigurationBuilder setDescription(String description)
Set the description to be used for the provider once registered.- Parameters:
description- the description to be used for the provider once registered.- Returns:
- this
JaspiConfigurationBuilderto allow chaining of commands. - Throws:
IllegalStateException- if the configuration has already been registered.
-
addAuthModuleFactory
public JaspiConfigurationBuilder addAuthModuleFactory(Supplier<javax.security.auth.message.module.ServerAuthModule> serverAuthModuleFactory)
Add aSupplierto be used to create aServerAuthModuleinstance for this message layer and application context combination.- Parameters:
serverAuthModuleFactory- theSupplierto be added to the list of module factories.- Returns:
- this
JaspiConfigurationBuilderto allow chaining of commands. - Throws:
IllegalStateException- if the configuration has already been registered.
-
addAuthModuleFactory
public JaspiConfigurationBuilder addAuthModuleFactory(Supplier<javax.security.auth.message.module.ServerAuthModule> serverAuthModuleFactory, Flag flag, Map options)
Add aSupplierto be used to create aServerAuthModuleinstance for this message layer and application context combination.- Parameters:
serverAuthModuleFactory- theSupplierto be added to the list of module factories.flag- the flag to control the handling of the auth module.options- the configuration options to pass to the module during initialisation.- Returns:
- this
JaspiConfigurationBuilderto allow chaining of commands. - Throws:
IllegalStateException- if the configuration has already been registered.
-
register
public String register()
Register the assembled configuration against the system wideAuthConfigFactory.- Returns:
- The registration ID returned by the factory on registration.
- Throws:
IllegalStateException- if the configuration has already been registered.
-
register
public String register(javax.security.auth.message.config.AuthConfigFactory authConfigFactory)
Register the assembled configuration against the suppliedAuthConfigFactory.- Parameters:
authConfigFactory- theAuthConfigFactoryto register the configuration against.- Returns:
- The registration ID returned by the factory on registration.
- Throws:
IllegalStateException- if the configuration has already been registered.
-
builder
public static JaspiConfigurationBuilder builder(String messageLayer, String applicationContext)
-
-