You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Colin McGuigan <co...@walkingshadows.org> on 2017/10/02 19:22:19 UTC
Extension hooking into log out
Currently, if you logout it removes your token from memory and redirects you
to the main page.
For an extension implementing SAML authentication, it would also be
necessary to send a message to the identity provider telling it to discard
its own token.
However, there seems to be no way to hook into this event. As best I can
tell, /api/tokens handles it completely internally and does not shell out to
any extension API.
The only ways I can see to implement this are:
1. Modify TokenRESTService in guacamole-client to call something in
AuthenticationProvider
2. Modify authenticationService.js so that it goes somewhere other than
/api/tokens
Both of these involve modifying the guacamole-client WAR which I am loathe
to do. Is there some option that I am missing (eg, overriding or replacing
the Javascript via guac-manifest.json)?
--
Sent from: http://apache-guacamole-incubating-users.2363388.n4.nabble.com/
Re: Extension hooking into log out
Posted by Colin McGuigan <co...@walkingshadows.org>.
Great, thank you!
--
Sent from: http://apache-guacamole-incubating-users.2363388.n4.nabble.com/
Re: Extension hooking into log out
Posted by Mike Jumper <mi...@guac-dev.org>.
On Mon, Oct 2, 2017 at 12:22 PM, Colin McGuigan <
colin_guacamole@walkingshadows.org> wrote:
> Currently, if you logout it removes your token from memory and redirects
> you
> to the main page.
>
> For an extension implementing SAML authentication, it would also be
> necessary to send a message to the identity provider telling it to discard
> its own token.
>
> However, there seems to be no way to hook into this event. As best I can
> tell, /api/tokens handles it completely internally and does not shell out
> to
> any extension API.
>
>
As of a few days ago, there is such an API:
https://issues.apache.org/jira/browse/GUACAMOLE-393
AuthenticatedUser and UserContext now both define an invalidate() function
which is invoked upon user logout:
https://github.com/apache/incubator-guacamole-client/blob/d808f7fbbdef9a0e14b139ac31e9fa225354efc6/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/AuthenticatedUser.java#L52-L57
https://github.com/apache/incubator-guacamole-client/blob/d808f7fbbdef9a0e14b139ac31e9fa225354efc6/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/UserContext.java#L233-L238
You will need to build off git to leverage this.
- Mike