Package org.wildfly.security.http.util
Class PropertiesServerMechanismFactory
java.lang.Object
org.wildfly.security.http.util.PropertiesServerMechanismFactory
- All Implemented Interfaces:
HttpServerAuthenticationMechanismFactory
public final class PropertiesServerMechanismFactory
extends Object
implements HttpServerAuthenticationMechanismFactory
A
HttpServerAuthenticationMechanismFactory that adds a predefined set of properties to all calls to the delegate.- Author:
- Darran Lofthouse
-
Constructor Summary
ConstructorsConstructorDescriptionPropertiesServerMechanismFactory(HttpServerAuthenticationMechanismFactory delegate, Map<String, ?> properties) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptioncreateAuthenticationMechanism(String mechanismName, Map<String, ?> properties, CallbackHandler callbackHandler) Create an instance of the requestedHttpServerAuthenticationMechanismFactory.String[]getMechanismNames(Map<String, ?> properties) Obtain the list of available mechanism names after merging the properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.security.http.HttpServerAuthenticationMechanismFactory
shutdown
-
Constructor Details
-
PropertiesServerMechanismFactory
public PropertiesServerMechanismFactory(HttpServerAuthenticationMechanismFactory delegate, Map<String, ?> properties) Construct a new instance.- Parameters:
delegate- theHttpServerAuthenticationMechanismFactorycalls are delegated to.properties- the properties that should be added to any properties passed in overriding any duplicate keys.
-
-
Method Details
-
getMechanismNames
Obtain the list of available mechanism names after merging the properties.- Specified by:
getMechanismNamesin interfaceHttpServerAuthenticationMechanismFactory- Parameters:
properties- the initial set of properties to pass to the delegate to obtain the mechanism names.- Returns:
- the list of authentication mechanisms available form this factory.
- See Also:
-
createAuthenticationMechanism
public HttpServerAuthenticationMechanism createAuthenticationMechanism(String mechanismName, Map<String, ?> properties, CallbackHandler callbackHandler) throws HttpAuthenticationExceptionCreate an instance of the requestedHttpServerAuthenticationMechanismFactory.- Specified by:
createAuthenticationMechanismin interfaceHttpServerAuthenticationMechanismFactory- Parameters:
mechanismName- the name of the mechanism being requested.properties- initial properties to be passed into the delegate factory.callbackHandler- theCallbackHandlerto use for verification.- Returns:
- The newly created
HttpServerAuthenticationMechanismFactory, ornullif not availbale. - Throws:
HttpAuthenticationException- See Also:
-