On Tue, Jul 25, 2023 at 3:29 PM Gabriel Huerta Araujo
<huert...@globalhitss.com> wrote:
>
>
> >> Because that endpoint has not been implemented in the Guacamole Client 
> >> code. The Token REST service only has two endpoints:
> >> * POST that takes credentials and produces a token, assuming the 
> >> authentication succeeds.
> >> * DELETE with a single token that invalidates the token.
>
> Ok, I have to extend DirectoryResource to manage LoggedUsers? Something that 
> looks like ActiveConnectionDirectoryResource class?

I don't think DirectoryResource is what you need to extend or change -
since the tokens are managed through TokenRESTService, I suspect
that's where you'll need to add the code.

>
> If yes, some link which clarifies how to do this stuff?

Nothing specific, no, but if you have a look at the REST API code, you
should see roughly how to do it.

That said, why do you need to do this with a PATCH call? The PATCH
seems like it is better-suited for doing multiple types of operations
(add/remove/update) for multiple objects in a single shot. All you're
trying to do is remove one or more tokens. It seems like you could
either:
* Write a REST API client to loop through tokens and use the existing
DELETE endpoint to delete them one at a time.
* Update the TokenRESTService class with a DELETE endpoint that takes
an array of tokens instead of a single token.

The first accomplishes removal of multiple tokens without any
modification to the Guacamole REST code, the second will allow you to
do a single REST call, if, for some reason, there's value in doing it
all in one shot.

-Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org
For additional commands, e-mail: user-h...@guacamole.apache.org

Reply via email to