On Wed, Dec 21, 2016 at 12:12 PM,  <[email protected]> wrote:
> And, yet another update on this.  The URL/URI that is being processed in the
> authenticateUser function, passed through via the credentials argument, is
> for the /api/tokens location.  Furthermore, I'm proxying Tomcat behind
> Apache HTTPD, so the full URL shows up as:
> http://localhost:8080/guacamole/api/tokens
> and the URI as:
> /guacamole/api/tokens
>
> This explains why the method is always showing up as POST and why the ticket
> parameter cannot be found.  Any ideas where I should go next in tweaking
> this?  Basically when authenticating to CAS you pass a service= parameter in
> the URL that tells CAS what page to call after authentication succeeds.  I
> currently have that set to /guacamole, so CAS authenticates, then calls
> /guacamole?ticket=<TICKET NUMBER> - but that's not what is picked up by this
> function.
>

Guacamole will automatically grab parameters from the URL (via
JavaScript) and forward them along with the POST to .../api/tokens,
but Angular (and thus Guacamole) will only see those parameters if
they are after the "/#/" that Angular uses for its own URLs. Somehow
the URL format needs to get reformatted to:

.../guacamole/#/?ticket=<TICKET NUMBER>

In the OpenID proof-of-concept, I ended up having to deal with similar
issues via reconfiguring the routing:

https://github.com/mike-jumper/guacamole-auth-openid/blob/348151bd299617e21840a5d526af150016fdcbec/src/main/resources/oauthConfig.js#L38-L57

If the parameter is in the URL *at all*, your JavaScript should still
be able to read it, however, even if Angular doesn't like the format.
Perhaps your field implementation could grab that data manually before
submitting itself?

- Mike

Reply via email to