Class PropertiesServerMechanismFactory

java.lang.Object
org.wildfly.security.http.util.PropertiesServerMechanismFactory
All Implemented Interfaces:
org.wildfly.security.http.HttpServerAuthenticationMechanismFactory

public final class PropertiesServerMechanismFactory extends Object implements org.wildfly.security.http.HttpServerAuthenticationMechanismFactory
A HttpServerAuthenticationMechanismFactory that adds a predefined set of properties to all calls to the delegate.
Author:
Darran Lofthouse
  • Constructor Details

    • PropertiesServerMechanismFactory

      public PropertiesServerMechanismFactory(org.wildfly.security.http.HttpServerAuthenticationMechanismFactory delegate, Map<String,?> properties)
      Construct a new instance.
      Parameters:
      delegate - the HttpServerAuthenticationMechanismFactory calls are delegated to.
      properties - the properties that should be added to any properties passed in overriding any duplicate keys.
  • Method Details

    • getMechanismNames

      public String[] getMechanismNames(Map<String,?> properties)
      Obtain the list of available mechanism names after merging the properties.
      Specified by:
      getMechanismNames in interface org.wildfly.security.http.HttpServerAuthenticationMechanismFactory
      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:
      • HttpServerAuthenticationMechanismFactory.getMechanismNames(java.util.Map)
    • createAuthenticationMechanism

      public org.wildfly.security.http.HttpServerAuthenticationMechanism createAuthenticationMechanism(String mechanismName, Map<String,?> properties, CallbackHandler callbackHandler) throws org.wildfly.security.http.HttpAuthenticationException
      Create an instance of the requested HttpServerAuthenticationMechanismFactory.
      Specified by:
      createAuthenticationMechanism in interface org.wildfly.security.http.HttpServerAuthenticationMechanismFactory
      Parameters:
      mechanismName - the name of the mechanism being requested.
      properties - initial properties to be passed into the delegate factory.
      callbackHandler - the CallbackHandler to use for verification.
      Returns:
      The newly created HttpServerAuthenticationMechanismFactory, or null if not availbale.
      Throws:
      org.wildfly.security.http.HttpAuthenticationException
      See Also:
      • HttpServerAuthenticationMechanismFactory.createAuthenticationMechanism(java.lang.String, java.util.Map, javax.security.auth.callback.CallbackHandler)