diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/DelegatingConnection.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/DelegatingConnection.java
index b80e8683a..95b6e9326 100644
--- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/DelegatingConnection.java
+++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/DelegatingConnection.java
@@ -19,6 +19,7 @@
package org.apache.guacamole.net.auth;
+import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -39,6 +40,24 @@ public class DelegatingConnection implements Connection {
*/
private final Connection connection;
+ /**
+ * The tokens which should apply strictly to the next call to
+ * {@link #connect(org.apache.guacamole.protocol.GuacamoleClientInformation)}.
+ * This storage is intended as a temporary bridge allowing the old version
+ * of connect() to be overridden while still resulting in the same behavior
+ * as older versions of DelegatingConnection. This storage should be
+ * removed once support for the old, deprecated connect() is removed.
+ */
+ private final ThreadLocal