Interface PasswordServiceLocal

    • Method Detail

      • addValidations

        void addValidations​(Property property,
                            BasicUser user,
                            String username,
                            PasswordType passwordType,
                            boolean atRegistration)
        Adds all password validations according to specified password type.
        Throws:
        IllegalActionException - When the given password type doesn't apply to the given user
      • blockByTries

        void blockByTries​(Password password)
        Blocks the given password for exceeding tries
      • exists

        boolean exists​(BasicUser user,
                       PasswordType passwordType)
        Returns whether a valid password exists for the given user / password type
      • getExpirationDate

        Date getExpirationDate​(Password password)
        Returns the expiration date according to the password's type. Null if the password does not expire.
      • getPasswordAndStatus

        Pair<Password,​PasswordStatus> getPasswordAndStatus​(BasicUser user,
                                                                 PasswordType passwordType)
        Returns the status and the password record for the given user and password type. The returned status may be different from the one in the password. For example, the password might have never been created (will be null) or there could be one of the calculated statuses, like blocked or expired.
      • getRedundantAccessPasswordStatus

        PasswordStatus getRedundantAccessPasswordStatus​(BasicUser user,
                                                        PasswordType type)
        Returns the redundant password status for the given type.
        The redundant statuses are stored directly in the user entity to make authentication faster.
      • isPendingSecurityQuestion

        boolean isPendingSecurityQuestion()
        Returns whether the currently authenticated user needs to set a security question
      • isUserCanChangePassword

        boolean isUserCanChangePassword​(BasicUser user,
                                        PasswordType passwordType)
        Returns if the given user can change the password for the given type
      • remove

        boolean remove​(BasicUser user,
                       PasswordType passwordType)
        Removes the password of the given user and type
      • updateUser

        void updateUser​(BasicUser user)
        Update the redundant password status information on the user