Should return null if user is not valid.
[guacamole.git] / src / main / java / net / sourceforge / guacamole / net / basic / BasicFileAuthenticationProvider.java
index 0b5b648..91a6b1b 100644 (file)
@@ -137,10 +137,13 @@ public class BasicFileAuthenticationProvider implements AuthenticationProvider<U
         
         // Validate and return info for given user and pass
         AuthInfo info = mapping.get(credentials.getUsername());
-        if (info != null && info.validate(credentials.getUsername(), credentials.getPassword()))
+        if (info != null && info.validate(credentials.getUsername(), credentials.getPassword())) {
             configs.put("DEFAULT", info.getConfiguration());
+            return configs;
+        }
 
-        return configs;
+        // Unauthorized
+        return null;
 
     }