Class AuthenticationUserVerifierFactory


  • public class AuthenticationUserVerifierFactory
    extends Object
    Factory that provides external verifiers of user authentication that are invoked around a user authentication:
    • some to verify whether the user can log on in relation to its account state,
    • another one to verify whether the user can try to log on one more time after a login error,
    Author:
    Yohann Chastagnier Date: 06/02/13
    • Method Detail

      • removeFromRequestCache

        public static void removeFromRequestCache​(User user)
        Removes from request cache the given user.
        Parameters:
        user - the user behind a login attempt.
      • getUserCanLoginVerifier

        public static UserCanLoginVerifier getUserCanLoginVerifier​(User user)
        Gets the verifier of the account state of the specified user.
        Parameters:
        user - the user behind a login attempt.
        Returns:
        the verifier that checks if the user can log on in relation to its account state
      • getUserCanLoginVerifier

        public static UserCanLoginVerifier getUserCanLoginVerifier​(String userId)
        Gets the verifier of the account state if the specified user.
        Parameters:
        userId - the unique identifier of the user behind a login attempt.
        Returns:
        the verifier that checks if the user can log on in relation to its account state
      • getUserCanLoginVerifier

        public static UserCanLoginVerifier getUserCanLoginVerifier​(AuthenticationCredential credential)
        Gets the verifier of the account state of user referred by the specified credentials.
        Parameters:
        credential - the credential of the user behind the login.
        Returns:
        the verifier that checks if the user can log on in relation to its account state
      • getUserCanTryAgainToLoginVerifier

        public static UserCanTryAgainToLoginVerifier getUserCanTryAgainToLoginVerifier​(AuthenticationCredential credential)
        Gets the verifier of login attempts with the specified credentials.
        Parameters:
        credential - the credential of the user behind the login.
        Returns:
        the verifier that checks if the user can try to log on one more time after a login error
      • getUserCanTryAgainToLoginVerifier

        public static UserCanTryAgainToLoginVerifier getUserCanTryAgainToLoginVerifier​(User user)
        Gets the verifier of login attempts by the specified user.
        Parameters:
        user - the user behind a login attempt.
        Returns:
        the verifier that checks if the user can try to log on one more time after a login error
      • getUserMustChangePasswordVerifier

        public static UserMustChangePasswordVerifier getUserMustChangePasswordVerifier​(User user)
        Gets the verifier about the state of the password of the specified user.
        Parameters:
        user - the user behind a login attempt.
        Returns:
        the verifier that checks if the user must change his password or if the user will soon have to change his password
      • getUserMustChangePasswordVerifier

        public static UserMustChangePasswordVerifier getUserMustChangePasswordVerifier​(AuthenticationCredential credential)
        Gets the verifier about the state of the password passed in the credentials.
        Parameters:
        credential - the credential of the user behind the login.
        Returns:
        the verifier that checks if the user must change his password or if the user will soon have to change his password
      • getUserMustAcceptTermsOfServiceVerifier

        public static UserMustAcceptTermsOfServiceVerifier getUserMustAcceptTermsOfServiceVerifier​(AuthenticationCredential credential)
        Gets the terms of service verifier for the user referred by the specified credentials.
        Parameters:
        credential - the credential of the user behind the login.
        Returns:
        the verifier that checks if the user must accept terms of service
      • getUserMustAcceptTermsOfServiceVerifier

        public static UserMustAcceptTermsOfServiceVerifier getUserMustAcceptTermsOfServiceVerifier​(String tosToken)
        Gets the terms of service verifier for the specified token with which the verifier is mapped. Each verifier is identified by a key (the token here) in a cache and these verifiers are each for a given user trying to log on.
        Parameters:
        tosToken - a token.
        Returns:
        the verifier that checks if the user must accept terms of service.