public void init(String username, Credentials credentials,
            Set<String> effectiveGroups, Map<String, String> tokens) {

        this.credentials = credentials;
        this.effectiveGroups = Collections.unmodifiableSet(effectiveGroups);
        this.tokens = Collections.unmodifiableMap(tokens);
        setIdentifier(username);

        // Update credentials with username provided via SSO for sake of
        // ${GUAC_USERNAME} token
        credentials.setUsername(username);

    }
Initializes this SSOAuthenticatedUser, associating it with the given
username, credentials, groups, and parameter tokens. The contents of the
given credentials are automatically updated to match the provided
username. This function must be invoked for every SSOAuthenticatedUser
created.

@param username
    The username of the user that was authenticated.

@param credentials
    The credentials provided when this user was authenticated. These
    credentials will be updated to match the provided username.

@param effectiveGroups
    The groups that the authenticated user belongs to.

@param tokens
    A map of all the name/value pairs that should be available
    as tokens when connections are established by this user.
extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/src/main/java/org/apache/guacamole/auth/sso/user/SSOAuthenticatedUser.java