# HG changeset patch # User Kim Alvefur # Date 1595274907 -7200 # Node ID 504a0cd5f883411d2e7232edf06baddd5fc2973f # Parent 5790c3cf615b62462442ae0e3708519d428a6ce6 mod_rest/README: Mention OAuth mod_http_oauth2 needs docs too diff -r 5790c3cf615b -r 504a0cd5f883 mod_rest/README.markdown --- 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 ' Hello!