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:
@@ -58,7 +58,7 @@ public class CASAuthenticationProviderModule extends AbstractModule {
|
||||
throws GuacamoleException {
|
||||
|
||||
// Get local environment
|
||||
this.environment = new LocalEnvironment();
|
||||
this.environment = LocalEnvironment.getInstance();
|
||||
|
||||
// Store associated auth provider
|
||||
this.authProvider = authProvider;
|
||||
|
@@ -58,7 +58,7 @@ public class DuoAuthenticationProviderModule extends AbstractModule {
|
||||
throws GuacamoleException {
|
||||
|
||||
// Get local environment
|
||||
this.environment = new LocalEnvironment();
|
||||
this.environment = LocalEnvironment.getInstance();
|
||||
|
||||
// Store associated auth provider
|
||||
this.authProvider = authProvider;
|
||||
|
@@ -56,7 +56,7 @@ public class HTTPHeaderAuthenticationProviderModule extends AbstractModule {
|
||||
throws GuacamoleException {
|
||||
|
||||
// Get local environment
|
||||
this.environment = new LocalEnvironment();
|
||||
this.environment = LocalEnvironment.getInstance();
|
||||
|
||||
// Store associated auth provider
|
||||
this.authProvider = authProvider;
|
||||
|
@@ -20,25 +20,23 @@
|
||||
package org.apache.guacamole.auth.jdbc;
|
||||
|
||||
import org.apache.guacamole.GuacamoleException;
|
||||
import org.apache.guacamole.environment.LocalEnvironment;
|
||||
import org.apache.guacamole.auth.jdbc.security.PasswordPolicy;
|
||||
import org.apache.guacamole.environment.DelegatingEnvironment;
|
||||
import org.apache.guacamole.environment.LocalEnvironment;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
|
||||
/**
|
||||
* A JDBC-specific implementation of Environment that defines generic properties
|
||||
* intended for use within JDBC based authentication providers.
|
||||
*/
|
||||
public abstract class JDBCEnvironment extends LocalEnvironment {
|
||||
public abstract class JDBCEnvironment extends DelegatingEnvironment {
|
||||
|
||||
/**
|
||||
* Constructs a new JDBCEnvironment using an underlying LocalEnviroment to
|
||||
* read properties from the file system.
|
||||
*
|
||||
* @throws GuacamoleException
|
||||
* If an error occurs while setting up the underlying LocalEnvironment.
|
||||
*/
|
||||
public JDBCEnvironment() throws GuacamoleException {
|
||||
super();
|
||||
public JDBCEnvironment() {
|
||||
super(LocalEnvironment.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -59,7 +59,7 @@ public class JSONAuthenticationProviderModule extends AbstractModule {
|
||||
throws GuacamoleException {
|
||||
|
||||
// Get local environment
|
||||
this.environment = new LocalEnvironment();
|
||||
this.environment = LocalEnvironment.getInstance();
|
||||
|
||||
// Store associated auth provider
|
||||
this.authProvider = authProvider;
|
||||
|
@@ -60,7 +60,7 @@ public class LDAPAuthenticationProviderModule extends AbstractModule {
|
||||
throws GuacamoleException {
|
||||
|
||||
// Get local environment
|
||||
this.environment = new LocalEnvironment();
|
||||
this.environment = LocalEnvironment.getInstance();
|
||||
|
||||
// Store associated auth provider
|
||||
this.authProvider = authProvider;
|
||||
|
@@ -59,7 +59,7 @@ public class OpenIDAuthenticationProviderModule extends AbstractModule {
|
||||
throws GuacamoleException {
|
||||
|
||||
// Get local environment
|
||||
this.environment = new LocalEnvironment();
|
||||
this.environment = LocalEnvironment.getInstance();
|
||||
|
||||
// Store associated auth provider
|
||||
this.authProvider = authProvider;
|
||||
|
@@ -57,7 +57,7 @@ public class QuickConnectAuthenticationProviderModule extends AbstractModule {
|
||||
AuthenticationProvider authProvider) throws GuacamoleException {
|
||||
|
||||
// Get local environment
|
||||
this.environment = new LocalEnvironment();
|
||||
this.environment = LocalEnvironment.getInstance();
|
||||
|
||||
// Store associated auth provider
|
||||
this.authProvider = authProvider;
|
||||
|
@@ -63,7 +63,7 @@ public class RadiusAuthenticationProviderModule extends AbstractModule {
|
||||
throws GuacamoleException {
|
||||
|
||||
// Get local environment
|
||||
this.environment = new LocalEnvironment();
|
||||
this.environment = LocalEnvironment.getInstance();
|
||||
|
||||
// Check for MD4 requirement
|
||||
RadiusAuthenticationProtocol authProtocol = environment.getProperty(RadiusGuacamoleProperties.RADIUS_AUTH_PROTOCOL);
|
||||
|
@@ -57,7 +57,7 @@ public class SAMLAuthenticationProviderModule extends AbstractModule {
|
||||
throws GuacamoleException {
|
||||
|
||||
// Get local environment
|
||||
this.environment = new LocalEnvironment();
|
||||
this.environment = LocalEnvironment.getInstance();
|
||||
|
||||
// Store associated auth provider
|
||||
this.authProvider = authProvider;
|
||||
|
@@ -59,7 +59,7 @@ public class TOTPAuthenticationProviderModule extends AbstractModule {
|
||||
throws GuacamoleException {
|
||||
|
||||
// Get local environment
|
||||
this.environment = new LocalEnvironment();
|
||||
this.environment = LocalEnvironment.getInstance();
|
||||
|
||||
// Store associated auth provider
|
||||
this.authProvider = authProvider;
|
||||
|
Reference in New Issue
Block a user