GitHub user mike-jumper opened a pull request:
https://github.com/apache/incubator-guacamole-client/pull/41
GUACAMOLE-5: Distinguish the authenticating AuthenticationProvider from the
data source
The changes from #36 were partly wrong, as `getAuthenticationProvider()` of
`AuthenticatedUser` will not always return the same `AuthenticationProvider`
that owns the data within the `UserContext`. As written, the value returned by
`getAuthenticationProvider()` of `UserContext` will be wrong for any case where
the `AuthenticatedUser` was authenticated by an `AuthenticationProvider` that
isn't the source of that same `UserContext`.
This change establishes a clear distinction, within the context of the
database extension, between the `AuthenticationProvider` which authenticated
the user and the database-specific `AuthenticationProvider` implementation
which serves as the data source.
Much of this is a rename of the database-specific `AuthenticatedUser`
implementation to `ModeledAuthenticatedUser`, and `UserContext` to
`ModeledUserContext`, both for the sake of future clarity, but there are also
substantive changes which fix the actual bug introduced by #36, particularly in
the use of the new `getModelAuthenticationProvider()` instead of
`getAuthenticationProvider()`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mike-jumper/incubator-guacamole-client
clarify-authenticateduser
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-guacamole-client/pull/41.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 #41
commit ad697c4fc5d09a21cda0a939b43b8b26ad3850b3
Author: Michael Jumper
Date: 2016-07-29T04:42:55Z
GUACAMOLE-5: Establish distinction between the AuthenticationProvider
storing a user's data and the AuthenticationProvider which authenticated the
user.
commit 544b3c6767c72638057c161b8b7ae43b02a85e90
Author: Michael Jumper
Date: 2016-07-29T04:45:56Z
GUACAMOLE-5: Clarify the JDBC-specific implementation of AuthenticatedUser.
commit 212e559edfbc5681fda947f3f0ecc3f94bc2e9cd
Author: Michael Jumper
Date: 2016-07-29T22:19:33Z
GUACAMOLE-5: Rename JDBC-specific UserContext to ModeledUserContext for
clarity.
---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---