Mercurial > prosody-modules
diff mod_rest/README.markdown @ 5650:0eb2d5ea2428
merge
author | Stephen Paul Weber <singpolyma@singpolyma.net> |
---|---|
date | Sat, 06 May 2023 19:40:23 -0500 |
parents | 5be04d1b16fb |
children | d194d1012fd3 |
line wrap: on
line diff
--- a/mod_rest/README.markdown Wed Feb 22 22:47:45 2023 -0500 +++ b/mod_rest/README.markdown Sat May 06 19:40:23 2023 -0500 @@ -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 '<iq type="get" to="example.net"> <ping xmlns="urn:xmpp:ping"/> @@ -111,7 +111,7 @@ ``` curl https://prosody.example:5281/rest/version/example.com \ - --oauth2-bearer dmVyeSBzZWNyZXQgdG9rZW4K \ + --user username \ -H 'Accept: application/json' ```