Mercurial > prosody-modules
comparison mod_auth_oauth_external/mod_auth_oauth_external.lua @ 6365:42866d42e267
mod_auth_oauth_external: Implement user deletion
However, unless the user is also deleted from the OAuth provider, this
merely resets the account.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 17 Jan 2026 05:16:25 +0100 |
| parents | 9c110fbecd86 |
| children | cab284eaeb81 |
comparison
equal
deleted
inserted
replaced
| 6364:9c110fbecd86 | 6365:42866d42e267 |
|---|---|
| 41 -- server, no there. | 41 -- server, no there. |
| 42 provider.test_password = not_implemented; | 42 provider.test_password = not_implemented; |
| 43 provider.get_password = not_implemented; | 43 provider.get_password = not_implemented; |
| 44 provider.set_password = not_implemented; | 44 provider.set_password = not_implemented; |
| 45 provider.create_user = not_implemented; | 45 provider.create_user = not_implemented; |
| 46 provider.delete_user = not_implemented; | 46 |
| 47 function provider.delete_user(username) | |
| 48 return accounts:set(username, nil); | |
| 49 end | |
| 47 | 50 |
| 48 function provider.get_account_info(username) | 51 function provider.get_account_info(username) |
| 49 local account = accounts:get(username); | 52 local account = accounts:get(username); |
| 50 if not account then return nil, "Account not available"; end | 53 if not account then return nil, "Account not available"; end |
| 51 return { | 54 return { |
