GitHub user mike-jumper opened a pull request:
https://github.com/apache/incubator-guacamole-client/pull/56
GUACAMOLE-78: Handle anonymous users distinctly.
There has historically been no way to properly represent an anonymous user
within the Guacamole extension API. All users are required to have unique
identifiers, and the user interface renders a user-specific menu with logout
button at all times.
This change defines a reserved identifier
(`AuthenticatedUser.ANONYMOUS_IDENTIFIER` in Java,
`AuthenticationResult.ANONYMOUS_USERNAME` in JavaScript, in both cases simply
the empty string) which implicitly declares the user as anonymous, but must not
be used for any other purpose. The JDBC authentication has been modified to
return this username when a user authenticated via a share key (and thus has no
associated user account).
Unlike a traditionally-authenticated user, an anonymous user is not
presented the "user menu" which typically contains the "Home", "Settings", and
"Logout" options. When rendered within the admin interface, anonymous users are
listed as "Anonymous" with contrasting styling:

Anonymous users' authentication results are also not persisted via a cookie
like normal users, thus their session is transient. Closing the tab will
effectively log the user out.
Part of this involved actually defining a type within JavaScript for the
JSON returned from authentication attempts (now `AuthenticationResult`, in the
`auth` module), which up until now has never been documented client-side.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mike-jumper/incubator-guacamole-client
anonymous-users
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-guacamole-client/pull/56.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #56
----
commit fcefa7a7c7a0454994f0e184b70a2b4d631f12ec
Author: Michael Jumper <[email protected]>
Date: 2016-08-12T19:51:53Z
GUACAMOLE-78: Define a standard identifier for anonymous users.
commit df3f54a02d1a59e39b3c5cfb366436dddc58ecc4
Author: Michael Jumper <[email protected]>
Date: 2016-08-12T20:51:37Z
GUACAMOLE-78: Report users authenticated via share keys as anonymous.
commit c6323503d86520d0d261baea5a9cbe516f1c8dc9
Author: Michael Jumper <[email protected]>
Date: 2016-08-12T20:55:59Z
GUACAMOLE-78: Do not display user menu for anonymous users.
commit 22b3e268d6a5f3480af145b05e51677a396c7686
Author: Michael Jumper <[email protected]>
Date: 2016-08-12T21:18:33Z
GUACAMOLE-78: Use documented AuthenticationResult type for auth result
storage.
commit 225736d2373c9035083b11198c08993f6e494d1c
Author: Michael Jumper <[email protected]>
Date: 2016-08-12T21:49:37Z
GUACAMOLE-78: Store anonymous users' authentication results in memory only.
Do not persist via cookie.
commit 42cd4dca5d0b6a68052744604d32693d6497aa7c
Author: Michael Jumper <[email protected]>
Date: 2016-08-12T21:53:54Z
GUACAMOLE-78: Preserve query parameters when redirecting to user's home
page.
commit 21f184f42e63c5a338354d17fbcd06db7602c310
Author: Michael Jumper <[email protected]>
Date: 2016-08-13T03:05:33Z
GUACAMOLE-78: Render the usernames of anonymous users differently.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---