public String getUsername() {

        // Do not reveal TOTP mode unless enrollment is in progress
        if (key == null)
            return null;

        return key.getUsername();

    }
Returns the username of the user associated with the key being used to
generate TOTP codes. If the user's key is not being exposed to facilitate
enrollment, this value will not be exposed either.

@return
    The username of the user associated with the key being used to
    generate TOTP codes, or null if the user's key is not being exposed
    to facilitate enrollment.
extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/form/AuthenticationCodeField.java