Github user necouchman commented on a diff in the pull request:
https://github.com/apache/guacamole-client/pull/299#discussion_r197091333
--- Diff:
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/AuthenticationProviderService.java
---
@@ -221,21 +231,77 @@ public AuthenticatedUser authenticateUser(Credentials
credentials)
throw new GuacamoleInvalidCredentialsException("Permission
denied.", CredentialsInfo.USERNAME_PASSWORD);
try {
-
// Return AuthenticatedUser if bind succeeds
AuthenticatedUser authenticatedUser =
authenticatedUserProvider.get();
authenticatedUser.init(credentials);
+
+ // Set attributes
+ String username = credentials.getUsername();
+ Map<String, String> attrs = getLDAPAttributes(ldapConnection,
username);
+ authenticatedUser.setAttributes(attrs);
--- End diff --
Doesn't seem to be much reason for the `attrs` object, here, or `username`
- probably worth squashing these three lines down.
---