mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 09:03:21 +00:00 
			
		
		
		
	GUACAMOLE-524: Add LDAP attributes to credentials.
AuthenticationProviderService gets LDAP attributes from confService and queries the LDAP server to find values on user for specified attributes. Added a Map<String, String> to Credentials named ldapAttrs and a getLDAPAttributes() and setLDAPAttributes() to manipulate ldapAttrs on credentials. Once AuthenticationProviderService gets the values for the LDAP attributes it sets ldapAttrs on the credentials object.
This commit is contained in:
		| @@ -22,7 +22,7 @@ package org.apache.guacamole.net.auth; | ||||
| import java.io.Serializable; | ||||
| import javax.servlet.http.HttpServletRequest; | ||||
| import javax.servlet.http.HttpSession; | ||||
|  | ||||
| import java.util.Map; | ||||
|  | ||||
| /** | ||||
|  * Simple arbitrary set of credentials, including a username/password pair, | ||||
| @@ -72,6 +72,29 @@ public class Credentials implements Serializable { | ||||
|      */ | ||||
|     private transient HttpSession session; | ||||
|  | ||||
|     /** | ||||
|      * Arbitrary LDAP attributes specified in guacamole.properties | ||||
|      */ | ||||
|      private Map<String, String> ldapAttrs; | ||||
|  | ||||
|      /** | ||||
|       * Returns the lDAP attributes associated with this set of credentials. | ||||
|       * @return The LDAP attributes Map associated with this set of credentials, | ||||
|       *         or  null if no LDAP Attributes have been set. | ||||
|       */ | ||||
|      public Map<String, String> getLDAPAttributes() { | ||||
|          return ldapAttrs; | ||||
|      } | ||||
|  | ||||
|      /** | ||||
|       * Sets the LDAP attributes associated with this set of credentials. | ||||
|       * @param attributes The LDAP attributes to associate with this set of | ||||
|       *                   credentials. | ||||
|       */ | ||||
|      public void setLDAPAttributes(Map<String, String> attributes) { | ||||
|          this.ldapAttrs = attributes; | ||||
|      } | ||||
|  | ||||
|     /** | ||||
|      * Returns the password associated with this set of credentials. | ||||
|      * @return The password associated with this username/password pair, or | ||||
|   | ||||
		Reference in New Issue
	
	Block a user