guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vnick <>
Subject Re: Passing current client to extension
Date Tue, 17 Oct 2017 00:40:45 GMT
Cayetano wrote
> I am writing an extension that adds a few "buttons" to each connection.
> It works fine by passing "{{context.getClientIdentifier (item)}}" for
> connection data.
> I need to also pass the name or the identifier of the user that is logged
> in. Something similar to:
> http: //someserver/page.php? connection = {{context.getClientIdentifier
> (item)}} & user = .....
> Can you help me with this?
> I've tried using {item.currenUserName} and others, with no result.
> Thank you

I don't think you'll find it in the context object where you're getting the
connection name.  Take a look at the authenticationService module, and the
getCurrentUsername() method, in particular:

You'll need to inject the authenticationService module into your javascript
code, and make sure you make it available to whatever template you're
constructing, but it should be relatively straight-forward to get the


Sent from:

View raw message