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 ; }
Returns whether the given user s password is expired due to the password aging policy .