mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-362: Fix style issue; remove unnecessary LocalEnvironment initilization.
This commit is contained in:
committed by
Nick Couchman
parent
1c333106c0
commit
87fba0ed7b
@@ -39,9 +39,9 @@ import javax.crypto.Cipher;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
import javax.xml.bind.DatatypeConverter;
|
import javax.xml.bind.DatatypeConverter;
|
||||||
import org.apache.guacamole.GuacamoleException;
|
import org.apache.guacamole.environment.Environment;
|
||||||
import org.apache.guacamole.environment.LocalEnvironment;
|
|
||||||
import org.apache.guacamole.form.Field;
|
import org.apache.guacamole.form.Field;
|
||||||
|
import org.apache.guacamole.GuacamoleException;
|
||||||
import org.apache.guacamole.net.auth.Credentials;
|
import org.apache.guacamole.net.auth.Credentials;
|
||||||
import org.apache.guacamole.net.auth.credentials.CredentialsInfo;
|
import org.apache.guacamole.net.auth.credentials.CredentialsInfo;
|
||||||
import org.apache.guacamole.net.auth.credentials.GuacamoleInsufficientCredentialsException;
|
import org.apache.guacamole.net.auth.credentials.GuacamoleInsufficientCredentialsException;
|
||||||
@@ -70,6 +70,12 @@ public class AuthenticationProviderService {
|
|||||||
@Inject
|
@Inject
|
||||||
private ConfigurationService confService;
|
private ConfigurationService confService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Guacamole server environment.
|
||||||
|
*/
|
||||||
|
@Inject
|
||||||
|
private Environment environment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Service for validating received ID tickets.
|
* Service for validating received ID tickets.
|
||||||
*/
|
*/
|
||||||
@@ -150,6 +156,7 @@ public class AuthenticationProviderService {
|
|||||||
* @return
|
* @return
|
||||||
* The decrypted password, or null if it is unable to
|
* The decrypted password, or null if it is unable to
|
||||||
* decrypt the password.
|
* decrypt the password.
|
||||||
|
*
|
||||||
* @throws GuacamoleException
|
* @throws GuacamoleException
|
||||||
* If unable to get Guacamole configuration data
|
* If unable to get Guacamole configuration data
|
||||||
*/
|
*/
|
||||||
@@ -163,7 +170,7 @@ public class AuthenticationProviderService {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
// Open and read the file specified in the configuration.
|
// Open and read the file specified in the configuration.
|
||||||
File keyFile = new File(new LocalEnvironment().getGuacamoleHome(), confService.getClearpassKey().toString());
|
File keyFile = new File(environment.getGuacamoleHome(), confService.getClearpassKey().toString());
|
||||||
InputStream keyInput = new BufferedInputStream(new FileInputStream(keyFile));
|
InputStream keyInput = new BufferedInputStream(new FileInputStream(keyFile));
|
||||||
final byte[] keyBytes = new byte[(int) keyFile.length()];
|
final byte[] keyBytes = new byte[(int) keyFile.length()];
|
||||||
keyInput.read(keyBytes);
|
keyInput.read(keyBytes);
|
||||||
|
Reference in New Issue
Block a user