summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Server/SimpleUserRegistry.cpp')
-rw-r--r--Swiften/Server/SimpleUserRegistry.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/Swiften/Server/SimpleUserRegistry.cpp b/Swiften/Server/SimpleUserRegistry.cpp
new file mode 100644
index 0000000..1a6743a
--- /dev/null
+++ b/Swiften/Server/SimpleUserRegistry.cpp
@@ -0,0 +1,17 @@
+#include "Swiften/Server/SimpleUserRegistry.h"
+
+namespace Swift {
+
+SimpleUserRegistry::SimpleUserRegistry() {
+}
+
+bool SimpleUserRegistry::isValidUserPassword(const JID& user, const String& password) const {
+ std::map<JID,String>::const_iterator i = users.find(user);
+ return i != users.end() ? i->second == password : false;
+}
+
+void SimpleUserRegistry::addUser(const JID& user, const String& password) {
+ users.insert(std::make_pair(user, password));
+}
+
+}