<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.guacamole</groupId>
- <artifactId>guacamole-default-webapp</artifactId>
+ <artifactId>guacamole</artifactId>
<packaging>war</packaging>
<version>0.6.0</version>
- <name>guacamole-default-webapp</name>
+ <name>guacamole</name>
<url>http://guacamole.sourceforge.net/</url>
<properties>
<!-- Guacamole Authentication API -->
<dependency>
<groupId>net.sourceforge.guacamole</groupId>
- <artifactId>guacamole-common-auth</artifactId>
+ <artifactId>guacamole-auth</artifactId>
<version>0.6.0</version>
</dependency>
import java.util.HashMap;
import java.util.Map;
import net.sourceforge.guacamole.GuacamoleException;
-import net.sourceforge.guacamole.net.auth.UsernamePassword;
+import net.sourceforge.guacamole.net.auth.Credentials;
import net.sourceforge.guacamole.properties.FileGuacamoleProperty;
import net.sourceforge.guacamole.properties.GuacamoleProperties;
import net.sourceforge.guacamole.protocol.GuacamoleConfiguration;
*
* @author Michael Jumper
*/
-public class BasicFileAuthenticationProvider implements AuthenticationProvider<UsernamePassword> {
+public class BasicFileAuthenticationProvider implements AuthenticationProvider {
private Logger logger = LoggerFactory.getLogger(BasicFileAuthenticationProvider.class);
}
@Override
- public Map<String, GuacamoleConfiguration> getAuthorizedConfigurations(UsernamePassword credentials) throws GuacamoleException {
+ public Map<String, GuacamoleConfiguration> getAuthorizedConfigurations(Credentials credentials) throws GuacamoleException {
// Check mapping file mod time
File userMappingFile = getUserMappingFile();
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import net.sourceforge.guacamole.GuacamoleException;
-import net.sourceforge.guacamole.net.auth.UsernamePassword;
+import net.sourceforge.guacamole.net.auth.Credentials;
import net.sourceforge.guacamole.properties.GuacamoleProperties;
import net.sourceforge.guacamole.net.basic.properties.BasicGuacamoleProperties;
import net.sourceforge.guacamole.protocol.GuacamoleConfiguration;
String username = request.getParameter("username");
String password = request.getParameter("password");
- UsernamePassword credentials = new UsernamePassword();
+ // Build credentials object
+ Credentials credentials = new Credentials ();
+ credentials.setSession(httpSession);
+ credentials.setRequest(request);
credentials.setUsername(username);
credentials.setPassword(password);