Interface MechanismAuthenticationFactory<M,​F,​E extends Exception>

    • Method Detail

      • getSecurityDomain

        SecurityDomain getSecurityDomain()
        Get the underlying SecurityDomain that mechanisms created by this factory will be using for authentication.
        Returns:
        the underlying SecurityDomain that 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

        M createMechanism​(String name,
                          UnaryOperator<F> factoryTransformation)
                   throws E extends Exception
        Create the mechanism instance.
        Parameters:
        name - the mechanism name (must not be null)
        factoryTransformation - the transformation to apply to the factory (must not be null)
        Returns:
        the mechanism, or null if the mechanism with the given name is not supported
        Throws:
        E - if the mechanism instantiation failed
        E extends Exception
      • createMechanism

        default M createMechanism​(String name)
                           throws E extends Exception
        Create the mechanism instance.
        Parameters:
        name - the mechanism name (must not be null)
        Returns:
        the mechanism, or null if the mechanism with the given name is not supported
        Throws:
        E - if the mechanism instantiation failed
        E extends Exception
      • 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)