Class SimpleAuthConfigProvider
java.lang.Object
org.apache.catalina.authenticator.jaspic.SimpleAuthConfigProvider
- All Implemented Interfaces:
AuthConfigProvider
Basic implementation primarily intended for use when using third-party
ServerAuthModule implementations that only provide the module.-
Constructor Summary
ConstructorsConstructorDescriptionSimpleAuthConfigProvider(Map<String, String> properties, AuthConfigFactory factory) Creates a new SimpleAuthConfigProvider. -
Method Summary
Modifier and TypeMethodDescriptionprotected ServerAuthConfigcreateServerAuthConfig(String layer, String appContext, CallbackHandler handler, Map<String, String> properties) Creates the ServerAuthConfig.getClientAuthConfig(String layer, String appContext, CallbackHandler handler) getServerAuthConfig(String layer, String appContext, CallbackHandler handler) voidrefresh()
-
Constructor Details
-
SimpleAuthConfigProvider
Creates a new SimpleAuthConfigProvider.- Parameters:
properties- Properties to pass to the ServerAuthConfigfactory- AuthConfigFactory to register this provider with, ornull
-
-
Method Details
-
getClientAuthConfig
public ClientAuthConfig getClientAuthConfig(String layer, String appContext, 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(String layer, String appContext, CallbackHandler handler) throws AuthException The returned ServerAuthConfig is created lazily and cached.
- Specified by:
getServerAuthConfigin interfaceAuthConfigProvider- Throws:
AuthException
-
createServerAuthConfig
protected ServerAuthConfig createServerAuthConfig(String layer, String appContext, CallbackHandler handler, Map<String, 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
-