public UserCredentials getSharingCredentials(SharedConnectionDefinition definition) {

        // Return credentials defining a single expected parameter
        return new UserCredentials(SHARE_KEY,
                Collections.singletonMap(SHARE_KEY_NAME, definition.getShareKey()));

    }
Generates a set of temporary credentials which can be used to connect to
the given connection shared by the SharedConnectionDefinition.

@param definition
    The SharedConnectionDefinition which defines the connection being
    shared and any applicable restrictions.

@return
    A newly-generated set of temporary credentials which can be used to
    connect to the connection shared by the given
    SharedConnectionDefinition.
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/ConnectionSharingService.java