@GET
    @Path("sharingCredentials/{sharingProfile}")
    public APIUserCredentials getSharingCredentials(
            @PathParam("sharingProfile") String sharingProfileIdentifier)
            throws GuacamoleException {

        // Generate and return sharing credentials for the active connection
        return new APIUserCredentials(getInternalObject().getSharingCredentials(sharingProfileIdentifier));

    }
Retrieves a set of credentials which can be POSTed by another user to the
"/api/tokens" endpoint to obtain access strictly to this connection. The
retrieved credentials may be purpose-generated and temporary.

@param sharingProfileIdentifier The identifier of the sharing connection
defining the semantics of the shared session.

@return The set of credentials which should be used to access strictly
this connection.

@throws GuacamoleException If an error occurs while retrieving the
sharing credentials for this connection.
guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionResource.java