public void verifyPasswordAge(ModeledUser user) throws GuacamoleException {

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

        long minimumAge = policy.getMinimumAge();
        long passwordAge = getPasswordAge(user);

        // Require that sufficient time has elapsed before allowing the password
        // to be changed
        if (passwordAge < minimumAge)
            throw new PasswordTooYoungException("Password was already recently changed.",
                    minimumAge - passwordAge);

    }
Verifies that the given user can change their password without violating
password aging policy. If changing the user's password would violate the
aging policy, a GuacamoleException will be thrown.

@param user
    The user whose password is changing.

@throws GuacamoleException
    If the user's password cannot be changed due to the password aging
    policy, or of the password policy cannot be parsed from
    guacamole.properties.
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicyService.java