Software /
code /
prosody-modules
Comparison
mod_password_policy/mod_password_policy.lua @ 3351:662f2722f745
mod_password_policy: Export function to get policy in use by the module
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 09 Oct 2018 14:03:00 +0100 |
parent | 3350:cb26d04b391c |
child | 4828:56eba4bca28f |
comparison
equal
deleted
inserted
replaced
3350:cb26d04b391c | 3351:662f2722f745 |
---|---|
19 function check_password(password) | 19 function check_password(password) |
20 if #password < options.length then | 20 if #password < options.length then |
21 return nil, ("Password is too short (minimum %d characters)"):format(options.length); | 21 return nil, ("Password is too short (minimum %d characters)"):format(options.length); |
22 end | 22 end |
23 return true; | 23 return true; |
24 end | |
25 | |
26 function get_policy() | |
27 return options; | |
24 end | 28 end |
25 | 29 |
26 function handler(event) | 30 function handler(event) |
27 local origin, stanza = event.origin, event.stanza; | 31 local origin, stanza = event.origin, event.stanza; |
28 | 32 |