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


##########
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/AuthenticationProviderService.java:
##########
@@ -307,16 +312,39 @@ public LDAPAuthenticatedUser authenticateUser(Credentials 
credentials)
 
     }
 
+    /**
+     * Returns parameter current ldap domain token generated from user 
credentials
+     * @param credentials
+     *     The credentials used for authentication.
+     *
+     * @return
+     *     Domain name by splitting login username or null if no domain is 
detected.
+     */
+    private String getDomainToken(Credentials credentials) {
+        String ldapDomainName = null;
+        if (credentials.getUsername().contains("\\")) {
+            ldapDomainName = credentials.getUsername().split("\\\\")[0];
+        }
+        else if (credentials.getUsername().contains("@")) {
+            ldapDomainName = credentials.getUsername().split("@")[1];
+        }
+        return ldapDomainName;
+    }

Review Comment:
   Agree, I will do that.



-- 
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