mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-38: Brush up comments and removed some extra code.
This commit is contained in:
@@ -187,9 +187,10 @@
|
||||
|
||||
<!-- Jersey - JAX-RS Implementation -->
|
||||
<dependency>
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-server</artifactId>
|
||||
<version>1.17.1</version>
|
||||
<groupId>javax.ws.rs</groupId>
|
||||
<artifactId>jsr311-api</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Guice -->
|
||||
|
@@ -63,10 +63,6 @@ public class QuickConnectAuthenticationProvider extends SimpleAuthenticationProv
|
||||
public AuthenticatedUser authenticateUser(Credentials credentials)
|
||||
throws GuacamoleException {
|
||||
|
||||
String username = credentials.getUsername();
|
||||
if (username == null || username.isEmpty())
|
||||
throw new GuacamoleInvalidCredentialsException("You must login.", CredentialsInfo.USERNAME_PASSWORD);
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
@@ -27,10 +27,15 @@ import org.apache.guacamole.GuacamoleClientException;
|
||||
import org.apache.guacamole.GuacamoleException;
|
||||
import org.apache.guacamole.protocol.GuacamoleConfiguration;
|
||||
|
||||
/**
|
||||
* A utility class to parse out a URI into the settings necessary
|
||||
* to create and establish a Guacamole connection.
|
||||
*/
|
||||
public class QCParser {
|
||||
|
||||
/**
|
||||
* The default protocol to parse to if one is undefined.
|
||||
* The default protocol to parse to if one is provided in
|
||||
* the incoming URI..
|
||||
*/
|
||||
public static final String DEFAULT_URI_PROTOCOL = "ssh";
|
||||
|
||||
@@ -71,7 +76,7 @@ public class QCParser {
|
||||
}
|
||||
String protocol = qcUri.getScheme();
|
||||
String host = qcUri.getHost();
|
||||
Integer port = qcUri.getPort();
|
||||
int port = qcUri.getPort();
|
||||
String userInfo = qcUri.getUserInfo();
|
||||
String query = qcUri.getQuery();
|
||||
String username = null;
|
||||
@@ -101,7 +106,7 @@ public class QCParser {
|
||||
GuacamoleConfiguration qcConfig = new GuacamoleConfiguration();
|
||||
qcConfig.setProtocol(protocol);
|
||||
qcConfig.setParameter("hostname",host);
|
||||
qcConfig.setParameter("port", port.toString());
|
||||
qcConfig.setParameter("port", Integer.toString(port));
|
||||
|
||||
if (username != null)
|
||||
qcConfig.setParameter("username", username);
|
||||
|
Reference in New Issue
Block a user