Class TwoFactorsAuthentication


  • public class TwoFactorsAuthentication
    extends Object
    Manages the Two Factor Authentication
    Since:
    7.7.3
    Author:
    Marco Meschieri - LogicalDOC
    • Constructor Detail

      • TwoFactorsAuthentication

        public TwoFactorsAuthentication()
    • Method Detail

      • checkSecondFactor

        public static void checkSecondFactor​(com.logicaldoc.core.security.User user,
                                             String key)
                                      throws com.logicaldoc.core.security.authentication.AuthenticationException
        Performs second factor authentication checks
        Parameters:
        user - the actual user that wants to login
        key - the key provided by the user
        Throws:
        com.logicaldoc.core.security.authentication.AuthenticationException - the user has not been authenticated
      • generateKey

        public static String generateKey​(com.logicaldoc.core.security.User user)
        Gets the right second factor authenticator and invoke the generateKey
        Parameters:
        user - the user trying to login
        Returns:
        the value returned by the second factor authenticator
      • init

        public static void init()
        Populate the authenticators using the extension point SecondAuthentication declared in the core plug-in.