GUACAMOLE-524: Removed unused imports, fixed comments, and condensed

code
This commit is contained in:
Jared Frees
2018-06-21 11:02:18 -04:00
parent cb4f284760
commit 927c04b9d4
3 changed files with 4 additions and 8 deletions

View File

@@ -26,9 +26,7 @@ import com.novell.ldap.LDAPAttributeSet;
import com.novell.ldap.LDAPConnection; import com.novell.ldap.LDAPConnection;
import com.novell.ldap.LDAPEntry; import com.novell.ldap.LDAPEntry;
import com.novell.ldap.LDAPException; import com.novell.ldap.LDAPException;
import com.novell.ldap.LDAPReferralException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.guacamole.auth.ldap.user.AuthenticatedUser; import org.apache.guacamole.auth.ldap.user.AuthenticatedUser;
@@ -236,9 +234,7 @@ public class AuthenticationProviderService {
authenticatedUser.init(credentials); authenticatedUser.init(credentials);
// Set attributes // Set attributes
String username = credentials.getUsername(); authenticatedUser.setAttributes(getLDAPAttributes(ldapConnection, credentials.getUsername()));
Map<String, String> attrs = getLDAPAttributes(ldapConnection, username);
authenticatedUser.setAttributes(attrs);
return authenticatedUser; return authenticatedUser;

View File

@@ -206,8 +206,8 @@ public class LDAPGuacamoleProperties {
}; };
/** /**
* Custom attribute or attributes in Guacamole user's record in the * Custom attribute or attributes to query from Guacamole user's record in
* LDAP directory. * the LDAP directory.
*/ */
public static final StringListProperty LDAP_USER_ATTRIBUTES = new StringListProperty() { public static final StringListProperty LDAP_USER_ATTRIBUTES = new StringListProperty() {

View File

@@ -182,7 +182,7 @@ public class StandardTokens {
* extensions. * extensions.
* *
* @param filter * @param filter
* The TokenFilter to add attributes tokens to. * The TokenFilter to add attribute tokens to.
* *
* @param attributes * @param attributes
* The map of key/value pairs to add tokens for. * The map of key/value pairs to add tokens for.