josnabattula commented on code in PR #931: URL: https://github.com/apache/guacamole-client/pull/931#discussion_r1483814298
########## 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: Thanks for response, figured out :) -- 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