On 5/12/23 12:22, Gabriel Huerta Araujo wrote:
To perform an action when a user logs in, you would implement an extension 
containing your own AuthentcationProvider that performs whatever tasks you need 
within getUserContext():
https://guacamole.apache.org/doc/guacamole-ext/org/apache/guacamole/net/auth/AuthenticationProvider.html#getUserContext(org.apache.guacamole.net.auth.AuthenticatedUser)

That function will be called for all installed extensions after authentication 
has succeeded.
To perform an action when a user logs out, you would make sure your 
implementation of getUserContext() returns a UserContext of your own that 
implements invalidate():

https://guacamole.apache.org/doc/guacamole-ext/org/apache/guacamole/net/auth/UserContext.html#invalidate()

That function is called for all UserContexts associated with a user when their 
session is no longer valid, including when they log out

 From the self-implemented interface (UserContext), do I just need to override 
said method, invalidate()? If not, of the methods to be implemented, what 
should I put?
You should use AbstractUserContext (you'll end up implementing a ton of stub functions otherwise), override invalidate(), and implement any remaining functions that have no implementation according to the JavaDoc:

https://guacamole.apache.org/doc/guacamole-ext/org/apache/guacamole/net/auth/AbstractUserContext.html

The overview of the above class describes this in more detail.

Same with AuthenticationProvider - you should use AbstractAuthenticationProvider:

https://guacamole.apache.org/doc/guacamole-ext/org/apache/guacamole/net/auth/AbstractAuthenticationProvider.html

- Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to