GUACAMOLE-78: Report users authenticated via share keys as anonymous.

This commit is contained in:
Michael Jumper
2016-08-12 13:51:37 -07:00
parent fcefa7a7c7
commit df3f54a02d

View File

@@ -19,7 +19,6 @@
package org.apache.guacamole.auth.jdbc.sharing.user; package org.apache.guacamole.auth.jdbc.sharing.user;
import java.util.UUID;
import org.apache.guacamole.auth.jdbc.user.RemoteAuthenticatedUser; import org.apache.guacamole.auth.jdbc.user.RemoteAuthenticatedUser;
import org.apache.guacamole.net.auth.AuthenticatedUser; import org.apache.guacamole.net.auth.AuthenticatedUser;
import org.apache.guacamole.net.auth.AuthenticationProvider; import org.apache.guacamole.net.auth.AuthenticationProvider;
@@ -61,7 +60,8 @@ public class SharedAuthenticatedUser extends RemoteAuthenticatedUser {
/** /**
* Creates a new SharedAuthenticatedUser associating the given user with * Creates a new SharedAuthenticatedUser associating the given user with
* their corresponding credentials and share key. The identifier (username) * their corresponding credentials and share key. The identifier (username)
* of the user will be randomly generated. * of the user will be the standard identifier for anonymous users as
* defined by the Guacamole extension API.
* *
* @param authenticationProvider * @param authenticationProvider
* The AuthenticationProvider that has authenticated the given user. * The AuthenticationProvider that has authenticated the given user.
@@ -77,7 +77,7 @@ public class SharedAuthenticatedUser extends RemoteAuthenticatedUser {
Credentials credentials, String shareKey) { Credentials credentials, String shareKey) {
super(authenticationProvider, credentials); super(authenticationProvider, credentials);
this.shareKey = shareKey; this.shareKey = shareKey;
this.identifier = UUID.randomUUID().toString(); this.identifier = AuthenticatedUser.ANONYMOUS_IDENTIFIER;
} }
/** /**