Software /
code /
prosody
Comparison
plugins/mod_auth_internal_hashed.lua @ 5156:6b08c922a2e4
mod_auth_internal_{plain,hashed}: Add support for iterating over accounts
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 21 Sep 2012 17:26:12 +0200 |
parent | 5117:2c7e1ce8f482 |
child | 5302:52fe5df91c65 |
comparison
equal
deleted
inserted
replaced
5155:a207d4bff5a4 | 5156:6b08c922a2e4 |
---|---|
100 return nil, "Auth failed. Invalid username"; | 100 return nil, "Auth failed. Invalid username"; |
101 end | 101 end |
102 return true; | 102 return true; |
103 end | 103 end |
104 | 104 |
105 function provider.users() | |
106 return datamanager.users(host, "accounts"); | |
107 end | |
108 | |
105 function provider.create_user(username, password) | 109 function provider.create_user(username, password) |
106 if password == nil then | 110 if password == nil then |
107 return datamanager.store(username, host, "accounts", {}); | 111 return datamanager.store(username, host, "accounts", {}); |
108 end | 112 end |
109 local salt = generate_uuid(); | 113 local salt = generate_uuid(); |