Software /
code /
prosody
Comparison
plugins/mod_auth_internal_hashed.lua @ 13213:50324f66ca2a
plugins: Use integer config API with interval specification where sensible
Many of these fall into a few categories:
- util.cache size, must be >= 1
- byte or item counts that logically can't be negative
- port numbers that should be in 1..0xffff
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 17 Jul 2023 01:38:54 +0200 |
parent | 13202:173038306750 |
comparison
equal
deleted
inserted
replaced
13212:3e6e98cc63e9 | 13213:50324f66ca2a |
---|---|
25 local hash_name = module:get_option_enum("password_hash", "SHA-1", "SHA-256"); | 25 local hash_name = module:get_option_enum("password_hash", "SHA-1", "SHA-256"); |
26 local get_auth_db = assert(scram_hashers[hash_name], "SCRAM-"..hash_name.." not supported by SASL library"); | 26 local get_auth_db = assert(scram_hashers[hash_name], "SCRAM-"..hash_name.." not supported by SASL library"); |
27 local scram_name = "scram_"..hash_name:gsub("%-","_"):lower(); | 27 local scram_name = "scram_"..hash_name:gsub("%-","_"):lower(); |
28 | 28 |
29 -- Default; can be set per-user | 29 -- Default; can be set per-user |
30 local default_iteration_count = module:get_option_number("default_iteration_count", 10000); | 30 local default_iteration_count = module:get_option_integer("default_iteration_count", 10000, 4096); |
31 | 31 |
32 local tokenauth = module:depends("tokenauth"); | 32 local tokenauth = module:depends("tokenauth"); |
33 | 33 |
34 -- define auth provider | 34 -- define auth provider |
35 local provider = {}; | 35 local provider = {}; |