necouchman commented on code in PR #931:
URL: https://github.com/apache/guacamole-client/pull/931#discussion_r1483812180


##########
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/AuthenticationProviderService.java:
##########
@@ -306,17 +306,42 @@ public LDAPAuthenticatedUser authenticateUser(Credentials 
credentials)
         }
 
     }
+    /**
+     * Returns parameter current ldap domain token generated from user 
credentials
+     * If no multiple LDAP are configured on GUACAMOLE_HOME such 
ldap-servers.yaml,
+     * a null is returned.
+     *
+     * @param credentials
+     *     The credentials to use for authentication.
+     *
+     * @return
+     *     Domain name by splitting logged username(domain/username) when 
multiple LDAP configuration is available
+     *     or null if no such configuration
+     */
+    private String getDomainToken(Credentials credentials) {
+        String ldapDomainName = null;
+        if (credentials.getUsername().contains("\\")) {
+            ldapDomainName = credentials.getUsername().split("\\\\")[0];
+        } else if (credentials.getUsername().contains("@")) {

Review Comment:
   @josnabattula Sure:
   `} else if (something else) {`
   
   This is known as "cuddling" tags. Code style for this project is:
   ```
   }
   else if (something else) {
   ```
   
   Where the `}` is not on the same line as the `else if` statement.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to