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<jakarta.security.auth.message.module.ServerAuthModule> serverAuthModuleFactory) Add aSupplier<jakarta.security.auth.message.module.ServerAuthModule>to be used to create aServerAuthModuleinstance for this message layer and application context combination.addAuthModuleFactory(Supplier<jakarta.security.auth.message.module.ServerAuthModule> serverAuthModuleFactory, Flag flag, Map options) Add aSupplier<jakarta.security.auth.message.module.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(jakarta.security.auth.message.config.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<jakarta.security.auth.message.module.ServerAuthModule> serverAuthModuleFactory) Add aSupplier<jakarta.security.auth.message.module.ServerAuthModule>to be used to create aServerAuthModuleinstance for this message layer and application context combination.- Parameters:
serverAuthModuleFactory- theSupplier<jakarta.security.auth.message.module.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<jakarta.security.auth.message.module.ServerAuthModule> serverAuthModuleFactory, Flag flag, Map options) Add aSupplier<jakarta.security.auth.message.module.ServerAuthModule>to be used to create aServerAuthModuleinstance for this message layer and application context combination.- Parameters:
serverAuthModuleFactory- theSupplier<jakarta.security.auth.message.module.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
-