Software /
code /
prosody
Comparison
plugins/mod_storage_xep0227.lua @ 13225:6375f0741f90
mod_storage_xep0227: Use enum option method
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 18 Jul 2023 12:32:05 +0200 |
parent | 12977:74b9e05af71e |
comparison
equal
deleted
inserted
replaced
13224:71c28b36923f | 13225:6375f0741f90 |
---|---|
78 local handlers = {}; | 78 local handlers = {}; |
79 | 79 |
80 -- In order to support custom account properties | 80 -- In order to support custom account properties |
81 local extended = "http://prosody.im/protocol/extended-xep0227\1"; | 81 local extended = "http://prosody.im/protocol/extended-xep0227\1"; |
82 | 82 |
83 local scram_hash_name = module:get_option_string("password_hash", "SHA-1"); | 83 local scram_hash_name = module:get_option_enum("password_hash", "SHA-1", "SHA-256"); |
84 local scram_properties = set.new({ "server_key", "stored_key", "iteration_count", "salt" }); | 84 local scram_properties = set.new({ "server_key", "stored_key", "iteration_count", "salt" }); |
85 | 85 |
86 handlers.accounts = { | 86 handlers.accounts = { |
87 get = function(self, user) | 87 get = function(self, user) |
88 user = getUserElement(self:_get_user_xml(user, self.host)); | 88 user = getUserElement(self:_get_user_xml(user, self.host)); |