public int getDigits() throws GuacamoleException {

        // Validate legal number of digits
        int digits = environment.getProperty(TOTP_DIGITS, 6);
        if (digits < 6 || digits > 8)
            throw new GuacamoleServerException("TOTP codes may have no fewer "
                    + "than 6 digits and no more than 8 digits.");

        return digits;

    }
Returns the number of digits which should be included in each generated
TOTP code. If not specified, 6 will be used by default.

@return
    The number of digits which should be included in each generated
    TOTP code.

@throws GuacamoleException
    If the "totp-digits" property cannot be read from
    guacamole.properties.
extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/conf/ConfigurationService.java