Package org.wildfly.security.http.util
Class PrivilegedServerMechanismFactory
- java.lang.Object
-
- org.wildfly.security.http.util.PrivilegedServerMechanismFactory
-
- All Implemented Interfaces:
HttpServerAuthenticationMechanismFactory
public final class PrivilegedServerMechanismFactory extends Object implements HttpServerAuthenticationMechanismFactory
AHttpServerAuthenticationMechanismFactorythat wraps a delegate so that any returnedHttpServerAuthenticationMechanismis wrapped by a wrapper that ensures all calls are using the providedAccessControlContext, if no AccessControlContext is provided then the one in place at the time this factory is instantiated is used instead.- Author:
- Darran Lofthouse
-
-
Constructor Summary
Constructors Constructor Description PrivilegedServerMechanismFactory(HttpServerAuthenticationMechanismFactory delegate)Construct a new instance ofPrivilegedServerMechanismFactoryusing the currentAccessControlContextfor calls to the wrapped factoryPrivilegedServerMechanismFactory(HttpServerAuthenticationMechanismFactory delegate, AccessControlContext accessControlContext)Construct a new instance ofPrivilegedServerMechanismFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpServerAuthenticationMechanismcreateAuthenticationMechanism(String mechanismName, Map<String,?> properties, CallbackHandler callbackHandler)String[]getMechanismNames(Map<String,?> properties)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.security.http.HttpServerAuthenticationMechanismFactory
shutdown
-
-
-
-
Constructor Detail
-
PrivilegedServerMechanismFactory
public PrivilegedServerMechanismFactory(HttpServerAuthenticationMechanismFactory delegate, AccessControlContext accessControlContext)
Construct a new instance ofPrivilegedServerMechanismFactory.- Parameters:
delegate- theHttpServerAuthenticationMechanismFactoryto delegate to.accessControlContext- theAccessControlContextto use for calls to the wrapped factory and subsequently any mechanism created by that factory.
-
PrivilegedServerMechanismFactory
public PrivilegedServerMechanismFactory(HttpServerAuthenticationMechanismFactory delegate)
Construct a new instance ofPrivilegedServerMechanismFactoryusing the currentAccessControlContextfor calls to the wrapped factory- Parameters:
delegate- theHttpServerAuthenticationMechanismFactoryto delegate to.
-
-
Method Detail
-
getMechanismNames
public String[] getMechanismNames(Map<String,?> properties)
- Specified by:
getMechanismNamesin interfaceHttpServerAuthenticationMechanismFactory- See Also:
HttpServerAuthenticationMechanismFactory.getMechanismNames(java.util.Map)
-
createAuthenticationMechanism
public HttpServerAuthenticationMechanism createAuthenticationMechanism(String mechanismName, Map<String,?> properties, CallbackHandler callbackHandler) throws HttpAuthenticationException
-
-