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 JaspiConfigurationBuilder
addAuthModuleFactory(Supplier<javax.security.auth.message.module.ServerAuthModule> serverAuthModuleFactory)
Add aSupplier
to be used to create aServerAuthModule
instance for this message layer and application context combination.JaspiConfigurationBuilder
addAuthModuleFactory(Supplier<javax.security.auth.message.module.ServerAuthModule> serverAuthModuleFactory, Flag flag, Map options)
Add aSupplier
to be used to create aServerAuthModule
instance for this message layer and application context combination.static JaspiConfigurationBuilder
builder(String messageLayer, String applicationContext)
String
register()
Register the assembled configuration against the system wideAuthConfigFactory
.String
register(javax.security.auth.message.config.AuthConfigFactory authConfigFactory)
Register the assembled configuration against the suppliedAuthConfigFactory
.JaspiConfigurationBuilder
setDescription(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
JaspiConfigurationBuilder
to 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 aSupplier
to be used to create aServerAuthModule
instance for this message layer and application context combination.- Parameters:
serverAuthModuleFactory
- theSupplier
to be added to the list of module factories.- Returns:
- this
JaspiConfigurationBuilder
to 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 aSupplier
to be used to create aServerAuthModule
instance for this message layer and application context combination.- Parameters:
serverAuthModuleFactory
- theSupplier
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
JaspiConfigurationBuilder
to 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
- theAuthConfigFactory
to 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)
-
-