Software /
code /
prosody
Comparison
teal-src/core/usermanager.d.tl @ 12904:4c321d889fdc
core.usermanager: Add Teal description file
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 23 Feb 2023 16:04:02 +0100 |
child | 12905:8473a516004f |
comparison
equal
deleted
inserted
replaced
12903:13950bf92802 | 12904:4c321d889fdc |
---|---|
1 local Role = require "util.roles".Role; | |
2 | |
3 local record usermanager | |
4 record AuthProvider | |
5 -- TODO | |
6 end | |
7 record AccountInfo | |
8 created : number | |
9 password_updated : any | |
10 enabled : boolean | |
11 end | |
12 | |
13 -- Users | |
14 test_password : function (username : string, host : string, password : string) : boolean | |
15 get_password : function (username : string, host : string) : string, string | |
16 set_password : function (username : string, host : string, password : string) : boolean, string | |
17 get_account_info : function (username : string, host : string) : AccountInfo | |
18 user_exists : function (username : string, host : string) : boolean | |
19 create_user : function (username : string, password : string, host : string) : boolean, string | |
20 delete_user : function (username : string, host : string) : boolean, string | |
21 users : function (host : string) : function () : string | |
22 | |
23 -- Roles | |
24 get_user_role : function (username : string, host : string) : Role | |
25 set_user_role : function (username : string, host : string, role_name : string) : boolean, string | |
26 user_can_assume_role : function (username : string, host : string, role_name : string) : boolean | |
27 add_user_secondary_role : function (username : string, host: string, role_name : string) : boolean, string | |
28 remove_user_secondary_role : function (username : string, host: string, role_name : string) : boolean, string | |
29 get_user_secondary_roles : function (username : string, host : string) : { string : Role } | |
30 get_users_with_role : function (role : string, host : string) : { string } | |
31 get_jid_role : function (jid : string, host : string) : Role | |
32 set_jid_role : function (jid : string, host : string, role_name : string) : boolean | |
33 get_jids_with_role : function (role : string, host : string) : { string } | |
34 get_role_by_name : function (role_name : string) : Role | |
35 | |
36 -- Etc | |
37 get_provider : function (host : string) : AuthProvider | |
38 get_sasl_handler : function (host : string, session : table) : table | |
39 initialize_host : function (host : string) | |
40 new_null_provider : function () : AuthProvider | |
41 end | |
42 | |
43 return usermanager |