@Override
    public UserContext decorate(UserContext context,
            AuthenticatedUser authenticatedUser, Credentials credentials)
            throws GuacamoleException {

        UserVerificationService verificationService =
                injector.getInstance(UserVerificationService.class);

        // Verify identity of user
        verificationService.verifyIdentity(context, authenticatedUser);

        // User has been verified, and authentication should be allowed to
        // continue
        return new TOTPUserContext(context);

    }
Creates a new TOTPAuthenticationProvider that verifies users using TOTP.

@throws GuacamoleException
    If a required property is missing, or an error occurs while parsing
    a property.
extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/TOTPAuthenticationProvider.java