Github user necouchman commented on a diff in the pull request:
https://github.com/apache/guacamole-client/pull/299#discussion_r194521920
--- Diff:
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/user/AuthenticatedUser.java
---
@@ -20,15 +20,19 @@
package org.apache.guacamole.auth.ldap.user;
import com.google.inject.Inject;
+import java.util.Map;
+import java.util.HashMap;
import org.apache.guacamole.net.auth.AbstractAuthenticatedUser;
+import org.apache.guacamole.net.auth.Attributes;
import org.apache.guacamole.net.auth.AuthenticationProvider;
import org.apache.guacamole.net.auth.Credentials;
/**
* An LDAP-specific implementation of AuthenticatedUser, associating a
* particular set of credentials with the LDAP authentication provider.
*/
-public class AuthenticatedUser extends AbstractAuthenticatedUser {
+public class AuthenticatedUser extends AbstractAuthenticatedUser
--- End diff --
The way this is implemented, here, these attributes (tokens) would not be
available to connections stored in the JDBC module, since the module you've
extended, here, is the LDAP-specific one. In order for this to cover multiple
authentication modules, you'll either have to implement this at one of the
parent classes (`AbstractAuthenticatedUser` perhaps) or across multiple
modules. Of course, that doesn't all have to be done with this one pull
request - this can just tackle LDAP for now - but the base changes that go into
it probably need to at least make it available for other extensions to
implement.
The other advantage of at least creating the abstract methods within one of
the parent classes is avoiding having to do the type-casting when trying to run
the `getAttributes()` method.
@mike-jumper Any pointers on the best place to put the various
attribute-related stuff such that it can be easily used across different
authentication extensions?
---