mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-641: Migrate existing extensions to singleton LocalEnvironment.
This commit is contained in:
@@ -63,25 +63,13 @@ public class FileAuthenticationProvider extends SimpleAuthenticationProvider {
|
||||
/**
|
||||
* Guacamole server environment.
|
||||
*/
|
||||
private final Environment environment;
|
||||
private final Environment environment = LocalEnvironment.getInstance();
|
||||
|
||||
/**
|
||||
* The filename to use for the user mapping.
|
||||
*/
|
||||
public static final String USER_MAPPING_FILENAME = "user-mapping.xml";
|
||||
|
||||
/**
|
||||
* Creates a new FileAuthenticationProvider that authenticates users against
|
||||
* simple, monolithic XML file.
|
||||
*
|
||||
* @throws GuacamoleException
|
||||
* If a required property is missing, or an error occurs while parsing
|
||||
* a property.
|
||||
*/
|
||||
public FileAuthenticationProvider() throws GuacamoleException {
|
||||
environment = new LocalEnvironment();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentifier() {
|
||||
return "default";
|
||||
|
@@ -171,7 +171,7 @@ public class SchemaResource {
|
||||
public Map<String, ProtocolInfo> getProtocols() throws GuacamoleException {
|
||||
|
||||
// Get and return a map of all protocols.
|
||||
Environment env = new LocalEnvironment();
|
||||
Environment env = LocalEnvironment.getInstance();
|
||||
return env.getProtocols();
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user