mike-jumper opened a new pull request #360: GUACAMOLE-524: Update connect() API changes for backward compatibility with 1.0.0. URL: https://github.com/apache/guacamole-client/pull/360 [As discussed on dev@](https://lists.apache.org/thread.html/c74221a629bd2da53996b0f6e4cfebc4647ac1239aa8817a45fd0c12@%3Cdev.guacamole.apache.org%3E), these changes modify the `Connectable` interface such that implementations of the previous version of the `connect()` function will continue to work, even if those implementations extended `SimpleConnection` and overrode the old, now-deprecated function. This is achieved through: 1. Continuing to use the old `connect()` as the basis for the implementation. 2. Using a `ThreadLocal` to make the additional `Map<String, String>` parameter available to the old `connect()` within a strict context. The `SimpleConnection` class and related classes are also modified to provide the same behavior as past releases, particularly for downstream subclasses. With these changes, things are ABI-compatible with 1.0.0. Things are also API-compatible with 1.0.0, though continuing to use/override the old `connect()` will result in compiler warnings. Behavior of the relevant classes should now be as follows: | Class | Behavior in 1.0.0 and older | New behavior | | ----- | --------------------------- | ------------ | | `SimpleAuthenticationProvider` | Tokens are applied and "baked-in" when the user authenticates. | Tokens are applied dynamically when connecting. | | `SimpleUserContext` | Tokens are applied only if explicitly implemented. | Tokens are applied only if explicitly implemented *or* if requested via the constructor. | | `SimpleConnection` | Tokens are applied only if explicitly implemented. | Tokens are applied only if explicitly implemented *or* if requested via the constructor. | Overall, behavior should be identical to 1.0.0 with the following exceptions: * Subclasses of `SimpleAuthenticationProvider` will now handle additional tokens and apply those tokens in context of the connection, not at time of authentication. * The result of calling `getConfiguration()` on a connection accessed via a subclass of `SimpleAuthenticationProvider` will now contain any tokens in uninterpreted form.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
