@Override
    public Credentials updateCredentials(Credentials credentials)
            throws GuacamoleException {

        // Ignore requests with no corresponding authentication session ID, as
        // there are no credentials to reconstitute if the user has not yet
        // attempted to authenticate
        String duoState = credentials.getParameter(UserVerificationService.DUO_STATE_PARAMETER_NAME);
        if (duoState == null)
            return credentials;

        // Ignore requests with invalid/expired authentication session IDs
        DuoAuthenticationSession session = sessionManager.resume(duoState);
        if (session == null)
            return credentials;

        // Reconstitute the originally-provided credentials from the users
        // authentication attempt prior to being redirected to Duo
        Credentials previousCredentials = session.getCredentials();
        previousCredentials.setRequestDetails(credentials.getRequestDetails());
        return previousCredentials;

    }
Creates a new DuoAuthenticationProvider that verifies users
using the Duo authentication service

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