public boolean isPasswordExpired(ModeledUser user)
            throws GuacamoleException {

        // Retrieve password policy from environment
        PasswordPolicy policy = environment.getPasswordPolicy();

        // There is no maximum password age if 0
        int maxPasswordAge = policy.getMaximumAge();
        if (maxPasswordAge == 0)
            return false;

        // Determine whether password is expired based on maximum age
        return getPasswordAge(user) >= maxPasswordAge;

    }
public boolean isPasswordExpired ( ModeledUser user ) throws GuacamoleException { PasswordPolicy policy = environment . getPasswordPolicy ( ) ; int maxPasswordAge = policy . getMaximumAge ( ) ; if ( maxPasswordAge == 0 ) return false ; return getPasswordAge ( user ) >= maxPasswordAge ; }
Returns whether the given user's password is expired due to the password
aging policy.

@param user
The user to check.

@return
true if the user needs to change their password to comply with the
password aging policy, false otherwise.

@throws GuacamoleException
If the password policy cannot be parsed.