changeset 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
parents cae3bb3dd45f
children 7998b49d6512
files mod_http_oauth2/README.markdown
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
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