Software /
code /
prosody-modules
Diff
mod_http_oauth2/README.markdown @ 5494:1bcf755c7bae
mod_http_oauth2: Add an example of client registration
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 26 May 2023 15:49:39 +0200 |
parent | 5493:cae3bb3dd45f |
child | 5505:efe9e741f222 |
line wrap: on
line diff
--- a/mod_http_oauth2/README.markdown Fri May 26 15:48:02 2023 +0200 +++ b/mod_http_oauth2/README.markdown Fri May 26 15:49:39 2023 +0200 @@ -127,6 +127,26 @@ - Informative URIs such as policy and terms of service **MUST** use the same scheme (i.e. `https://`) and hostname as the `client_uri`. +#### Registration Example + +In short registration works by POST-ing a JSON structure describing your +client to an endpoint: + +``` bash +curl -sSf https://xmpp.example.net/oauth2/register \ + -H Content-Type:application/json \ + -H Accept:application/json \ + --data ' +{ + "client_name" : "My Application", + "client_uri" : "https://app.example.com/", + "redirect_uris" : [ + "https://app.example.com/redirect" + ] +} +' +``` + ### Supported flows Various flows can be disabled and enabled with