mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUAC-586: Associate unique identifier with each AuthenticationProvider.
This commit is contained in:
@@ -192,6 +192,11 @@ public class MySQLAuthenticationProvider implements AuthenticationProvider {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentifier() {
|
||||
return "mysql";
|
||||
}
|
||||
|
||||
@Override
|
||||
public AuthenticatedUser authenticateUser(Credentials credentials)
|
||||
throws GuacamoleException {
|
||||
|
@@ -192,6 +192,11 @@ public class PostgreSQLAuthenticationProvider implements AuthenticationProvider
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentifier() {
|
||||
return "postgresql";
|
||||
}
|
||||
|
||||
@Override
|
||||
public AuthenticatedUser authenticateUser(Credentials credentials)
|
||||
throws GuacamoleException {
|
||||
|
@@ -74,6 +74,11 @@ public class LDAPAuthenticationProvider extends SimpleAuthenticationProvider {
|
||||
environment = new LocalEnvironment();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentifier() {
|
||||
return "ldap";
|
||||
}
|
||||
|
||||
// Courtesy of OWASP: https://www.owasp.org/index.php/Preventing_LDAP_Injection_in_Java
|
||||
private static String escapeLDAPSearchFilter(String filter) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@@ -122,6 +122,11 @@ public class NoAuthenticationProvider extends SimpleAuthenticationProvider {
|
||||
environment = new LocalEnvironment();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentifier() {
|
||||
return "noauth";
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the configuration file, as defined within guacamole.properties.
|
||||
*
|
||||
|
Reference in New Issue
Block a user