diff mod_rest/README.markdown @ 4068:504a0cd5f883

mod_rest/README: Mention OAuth mod_http_oauth2 needs docs too
author Kim Alvefur <zash@zash.se>
date Mon, 20 Jul 2020 21:55:07 +0200
parents 5790c3cf615b
children b89f381abaa9
line wrap: on
line diff
--- a/mod_rest/README.markdown	Mon Jul 20 21:54:52 2020 +0200
+++ b/mod_rest/README.markdown	Mon Jul 20 21:55:07 2020 +0200
@@ -23,9 +23,15 @@
 
 ``` {.lua}
 Component "rest.example.net" "rest"
-rest_credentials = "Bearer dmVyeSBzZWNyZXQgdG9rZW4K"
+component_secret = "dmVyeSBzZWNyZXQgdG9rZW4K"
+modules_enabled = {"http_oauth2"}
 ```
 
+## OAuth2
+
+[mod_http_oauth2] can be used to grant bearer tokens which are
+accepted by mod_rest.
+
 ## Sending stanzas
 
 The API endpoint becomes available at the path `/rest`, so the full URL
@@ -35,7 +41,7 @@
 
 ``` {.sh}
 curl https://prosody.example:5281/rest \
-    --oauth2-bearer dmVyeSBzZWNyZXQgdG9rZW4K \
+    --user username \
     -H 'Content-Type: application/xmpp+xml' \
     --data-binary '<message type="chat" to="user@example.org">
             <body>Hello!</body>