On Thu, Jul 24, 2025 at 4:42 PM Savinder Kaur <[email protected]> wrote:

> Hi Team ,
>
> Could you provide an example or guidance on creating a simple "Hello
> World" REST API specifically as a Guacamole extension (under extensions/),
> rather than placing it inside guacamole/rest?
>
> I’m looking to understand the correct architecture or best practices for
> exposing a basic endpoint entirely from an extension module.
>
>
I think you can look at some existing examples within the code in order to
understand this. Here are a few places to look:

https://github.com/apache/guacamole-client/blob/main/extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/rest/QuickConnectREST.java
https://github.com/apache/guacamole-client/blob/main/extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/QuickConnectUserContext.java#L121-L124
https://github.com/apache/guacamole-client/blob/main/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/src/main/java/org/apache/guacamole/auth/sso/SSOResource.java
https://github.com/apache/guacamole-client/blob/main/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/src/main/java/org/apache/guacamole/auth/sso/SSOAuthenticationProvider.java#L169-L172
https://github.com/apache/guacamole-client/blob/main/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/java/org/apache/guacamole/auth/ssl/SSLClientAuthenticationResource.java

Essentially:
* The AuthenticationProvider interface has a "getResource()" method that
can be used to create a REST API endpoint for the extension for use prior
to a user being successfully logged in.
* The UserContext interface has a "getResource()" method that can used to
create a REST API endpoint for the extension once a user is logged in.

See also:
https://guacamole.apache.org/doc/gug/guacamole-ext.html#rest-resources

-Nick

>

Reply via email to