Package org.wildfly.security.auth.jaspi
Class JaspiConfigurationBuilder
java.lang.Object
org.wildfly.security.auth.jaspi.JaspiConfigurationBuilder
A builder API to assemble JASPIC configuration.
- Author:
- Darran Lofthouse
-
Method Summary
Modifier and TypeMethodDescriptionaddAuthModuleFactory(Supplier<ServerAuthModule> serverAuthModuleFactory) Add aSupplier<ServerAuthModule>to be used to create aServerAuthModuleinstance for this message layer and application context combination.addAuthModuleFactory(Supplier<ServerAuthModule> serverAuthModuleFactory, Flag flag, Map options) Add aSupplier<ServerAuthModule>to be used to create aServerAuthModuleinstance for this message layer and application context combination.static JaspiConfigurationBuilderregister()Register the assembled configuration against the system wideAuthConfigFactory.register(AuthConfigFactory authConfigFactory) Register the assembled configuration against the suppliedAuthConfigFactory.setDescription(String description) Set the description to be used for the provider once registered.
-
Method Details
-
setDescription
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<ServerAuthModule> serverAuthModuleFactory) Add aSupplier<ServerAuthModule>to be used to create aServerAuthModuleinstance for this message layer and application context combination.- Parameters:
serverAuthModuleFactory- theSupplier<ServerAuthModule>to 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<ServerAuthModule> serverAuthModuleFactory, Flag flag, Map options) Add aSupplier<ServerAuthModule>to be used to create aServerAuthModuleinstance for this message layer and application context combination.- Parameters:
serverAuthModuleFactory- theSupplier<ServerAuthModule>to 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
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
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
-