Software / code / prosody-modules
Comparison
mod_rest/README.md @ 6272:ed6fa901cf94
mod_rest: Enable HTTP Basic authentication for Components
Not sure if mod_http_oauth2 still works for components
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 31 May 2025 16:59:35 +0200 |
| parent | 6236:5ab0e560027a |
comparison
equal
deleted
inserted
replaced
| 6271:b63202d66238 | 6272:ed6fa901cf94 |
|---|---|
| 35 modules_enabled = {"rest"} | 35 modules_enabled = {"rest"} |
| 36 ``` | 36 ``` |
| 37 | 37 |
| 38 ## As a Component | 38 ## As a Component |
| 39 | 39 |
| 40 If you install this as a component, you won't be able to use user authentication above, | 40 If you install this as a component, the HTTP Basic credentials are the components base JID along with its secret. |
| 41 and must use OAuth2 authentication outlined below. | |
| 42 | 41 |
| 43 ``` {.lua} | 42 ``` {.lua} |
| 44 Component "chat.example.com" "rest" | 43 Component "chat.example.com" "rest" |
| 45 component_secret = "dmVyeSBzZWNyZXQgdG9rZW4K" | 44 component_secret = "dmVyeSBzZWNyZXQgdG9rZW4K" |
| 46 modules_enabled = {"http_oauth2"} | |
| 47 ``` | 45 ``` |
| 48 | 46 |
| 49 ## User authentication | 47 ## User authentication |
| 50 | 48 |
| 51 To enable user authentication, edit the "admins = { }" section in prosody.cfg.lua, EG: | 49 To enable user authentication, edit the "admins = { }" section in prosody.cfg.lua, EG: |