On Fri, Feb 2, 2018 at 10:55 PM, zhangbin <zhang...@iat.one> wrote:

> Hello,
> how do I use guacamole/api/tokens and login remotely to guacamole web api
> by submitting username, password json format data to get the authentication
> code...

The easiest way to figure out what you need is to use something like Chrome
Developer Tools, the Network tab, specifically, and watch the login
process.  Basically it looks sometihng like this:
- You load the page, which posts to the tokens endpoint on the API and
receives a 403 INSUFFICIENT CREDENTIALS error.
- The AngularJS web application interprets this and presents the
username/password dialog
- You type your username and password, and submit
- This POSTs a application/x-www-form-urlencoded back to the token
endpoint, with the username and password as form parameters.
- In response, assuming successful authentication, you receive the
authToken back in the response, which you can then use as the token
parameter in subsequent API calls.

> so that direct calls to the remote desktop window can be made.

What kind of "direct calls" are you talking about, here?  Logging into the
API like this allows you to interact with the API using the token, but I'm
not sure about making direct calls to a remote desktop window.  You can
certainly use this method to establish a tunnel to a given connection, but
if you're thinking you can authenticate to the API and then somehow send
and receive data from a remote desktop session, this is not how it works -
at least, not quite that easily.


Reply via email to