Class SimpleAuthConfigProvider
- java.lang.Object
-
- org.apache.catalina.authenticator.jaspic.SimpleAuthConfigProvider
-
- All Implemented Interfaces:
AuthConfigProvider
public class SimpleAuthConfigProvider extends java.lang.Object implements AuthConfigProvider
Basic implementation primarily intended for use when using third-partyServerAuthModuleimplementations that only provide the module.
-
-
Constructor Summary
Constructors Constructor Description SimpleAuthConfigProvider(java.util.Map<java.lang.String,java.lang.String> properties, AuthConfigFactory factory)Creates a new SimpleAuthConfigProvider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ServerAuthConfigcreateServerAuthConfig(java.lang.String layer, java.lang.String appContext, javax.security.auth.callback.CallbackHandler handler, java.util.Map<java.lang.String,java.lang.String> properties)Creates the ServerAuthConfig.ClientAuthConfiggetClientAuthConfig(java.lang.String layer, java.lang.String appContext, javax.security.auth.callback.CallbackHandler handler)ServerAuthConfiggetServerAuthConfig(java.lang.String layer, java.lang.String appContext, javax.security.auth.callback.CallbackHandler handler)voidrefresh()
-
-
-
Constructor Detail
-
SimpleAuthConfigProvider
public SimpleAuthConfigProvider(java.util.Map<java.lang.String,java.lang.String> properties, AuthConfigFactory factory)Creates a new SimpleAuthConfigProvider.- Parameters:
properties- Properties to pass to the ServerAuthConfigfactory- AuthConfigFactory to register this provider with, ornull
-
-
Method Detail
-
getClientAuthConfig
public ClientAuthConfig getClientAuthConfig(java.lang.String layer, java.lang.String appContext, javax.security.auth.callback.CallbackHandler handler) throws AuthException
This implementation does not support client-side authentication and therefore always returns
null.- Specified by:
getClientAuthConfigin interfaceAuthConfigProvider- Throws:
AuthException
-
getServerAuthConfig
public ServerAuthConfig getServerAuthConfig(java.lang.String layer, java.lang.String appContext, javax.security.auth.callback.CallbackHandler handler) throws AuthException
The returned ServerAuthConfig is created lazily and cached.
- Specified by:
getServerAuthConfigin interfaceAuthConfigProvider- Throws:
AuthException
-
createServerAuthConfig
protected ServerAuthConfig createServerAuthConfig(java.lang.String layer, java.lang.String appContext, javax.security.auth.callback.CallbackHandler handler, java.util.Map<java.lang.String,java.lang.String> properties)
Creates the ServerAuthConfig. Can be overridden by subclasses to provide a custom implementation.- Parameters:
layer- Message layerappContext- Application contexthandler- Callback handlerproperties- Configuration properties- Returns:
- The ServerAuthConfig instance
-
refresh
public void refresh()
Delegates refresh to the cached ServerAuthConfig if one has been created.
- Specified by:
refreshin interfaceAuthConfigProvider
-
-