Package org.wildfly.security.auth.server
Interface MechanismAuthenticationFactory<M,F,E extends Exception>
- Type Parameters:
M- the type of mechanismF- the type of the mechanism's factoryE- the mechanism-type-specific exception that may be thrown upon instantiation
- All Known Implementing Classes:
AbstractMechanismAuthenticationFactory
public interface MechanismAuthenticationFactory<M,F,E extends Exception>
A generalized mechanism factory which authenticates against a security domain.
- Author:
- David M. Lloyd
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceMechanismAuthenticationFactory.Builder<M,F, E extends Exception> A builder for aMechanismAuthenticationFactory. -
Method Summary
Modifier and TypeMethodDescriptiondefault McreateMechanism(String name) Create the mechanism instance.createMechanism(String name, UnaryOperator<F> factoryTransformation) Create the mechanism instance.Get the actual factory used for instantiation.Get the collection of mechanism names may be supported by this factory.Get the underlyingSecurityDomainthat mechanisms created by this factory will be using for authentication.
-
Method Details
-
getSecurityDomain
SecurityDomain getSecurityDomain()Get the underlyingSecurityDomainthat mechanisms created by this factory will be using for authentication.- Returns:
- the underlying
SecurityDomainthat mechanisms created by this factory will be using for authentication.
-
getFactory
F getFactory()Get the actual factory used for instantiation.- Returns:
- the actual factory (not
null)
-
createMechanism
Create the mechanism instance.- Parameters:
name- the mechanism name (must not benull)factoryTransformation- the transformation to apply to the factory (must not benull)- Returns:
- the mechanism, or
nullif the mechanism with the given name is not supported - Throws:
E- if the mechanism instantiation failed
-
createMechanism
Create the mechanism instance.- Parameters:
name- the mechanism name (must not benull)- Returns:
- the mechanism, or
nullif the mechanism with the given name is not supported - Throws:
E- if the mechanism instantiation failed
-
getMechanismNames
Collection<String> getMechanismNames()Get the collection of mechanism names may be supported by this factory. The actual set of available mechanisms depends on run-time factors but will generally not be greater than this collection.- Returns:
- the mechanism names (not
null)
-