On Wed, Mar 26, 2025 at 4:07 AM Gal Sabas <gal...@checkpoint.com.invalid>
wrote:

> Hi,
>
>
>
> I have my own web-client that is based on guacamole-client.
>
> I’m trying to add support to the “required” request for parameter
> prompting, I added this code to my client:
>
>
>
> let client = new Guacamole.Client(tunnel)
>
> client.onrequired = function(params) {
>
> …
>
> client.send(credentials);
>
> }
>
>
>
> For some reason, no matter what I send through the credentials, guacd
> don’t seem to accept them. Do I need to disconnect from the client and then
> connect again with the credentials?
>
> Can someone please help me and maybe provide an example for and
> .onrequired?
>
>
>

The official Guacamole Client code uses this:

https://github.com/apache/guacamole-client/blob/78e0436dc202673686dc8a7741eca6cb21513d77/guacamole/src/main/frontend/src/app/client/types/ManagedClient.js#L720-L728

I'd highly suggest going through the Guacamole Client code, particularly
for the AngularJS front-end, to see how it is handled in there - this block
only takes care of letting the client know that a required instruction has
been sent and prompting the user - you have to go to a couple of other
places to see where the user is actually prompted and where those responses
are actually sent back to guacd.

And to answer your question, no, there is no need to disconnect and
reconnect - in the cases where guacd sends the "required" instruction, it
is usually because there is a call-back function from one of the supported
protocols being invoked that needs more information and is now waiting on
that information to be provided.

I know that's a very high-level answer - feel free to post back with more
specific/detailed questions.

-Nick

>

Reply via email to