# HG changeset patch # User Kim Alvefur # Date 1677604520 -3600 # Node ID 5be04d1b16fbc4571139a9f72beb1ea7607f0a4e # Parent 556bf57d64174d7d68d18f7ca17a452ce2234920 mod_rest: Remove confusing oauth2 tokens from examples Users were somehow confused into thinking that you should use the JID as username, rather than the username. diff -r 556bf57d6417 -r 5be04d1b16fb mod_rest/README.markdown --- a/mod_rest/README.markdown Thu Feb 23 21:07:13 2023 +0100 +++ b/mod_rest/README.markdown Tue Feb 28 18:15:20 2023 +0100 @@ -38,9 +38,9 @@ ## OAuth2 -[mod_http_oauth2] can be used to grant bearer tokens which are -accepted by mod_rest. Tokens can be passed to `curl` like -`--oauth2-bearer dmVyeSBzZWNyZXQgdG9rZW4K` as in some examples below. +[mod_http_oauth2] can be used to grant bearer tokens which are accepted +by mod_rest. Tokens can be passed to `curl` like `--oauth2-bearer +dmVyeSBzZWNyZXQgdG9rZW4K` instead of using `--user`. ## Sending stanzas @@ -62,7 +62,7 @@ ``` {.sh} curl https://prosody.example:5281/rest \ - --oauth2-bearer dmVyeSBzZWNyZXQgdG9rZW4K \ + --user username \ -H 'Content-Type: application/json' \ --data-binary '{ "body" : "Hello!", @@ -81,7 +81,7 @@ ``` curl https://prosody.example:5281/rest/message/chat/john@example.com \ - --oauth2-bearer dmVyeSBzZWNyZXQgdG9rZW4K \ + --user username \ -H 'Content-Type: text/plain' \ --data-binary 'Hello John!' ``` @@ -93,7 +93,7 @@ ``` {.sh} curl https://prosody.example:5281/rest \ - --oauth2-bearer dmVyeSBzZWNyZXQgdG9rZW4K \ + --user username \ -H 'Content-Type: application/xmpp+xml' \ --data-binary ' @@ -111,7 +111,7 @@ ``` curl https://prosody.example:5281/rest/version/example.com \ - --oauth2-bearer dmVyeSBzZWNyZXQgdG9rZW4K \ + --user username \ -H 'Accept: application/json' ```