changeset 5561:d6ab6f0bd96e

mod_http_oauth2: Add a more complete client registration example More fields from RFC 7591. We should probably mention and recommend more of them, especially the ones that are recorded in grants.
author Kim Alvefur <zash@zash.se>
date Thu, 22 Jun 2023 09:18:32 +0200 (18 months ago)
parents 697d799fe601
children 734788d8bfc3
files mod_http_oauth2/README.markdown
diffstat 1 files changed, 28 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_oauth2/README.markdown	Tue Jun 20 01:13:51 2023 +0200
+++ b/mod_http_oauth2/README.markdown	Thu Jun 22 09:18:32 2023 +0200
@@ -162,7 +162,7 @@
     document **MUST** use the same scheme (i.e. `https://`) and hostname
     as the `client_uri`.
 
-#### Registration Example
+#### Registration Examples
 
 In short registration works by POST-ing a JSON structure describing your
 client to an endpoint:
@@ -182,6 +182,33 @@
 '
 ```
 
+Another example with more fields:
+
+``` bash
+curl -sSf https://xmpp.example.net/oauth2/register \
+    -H Content-Type:application/json \
+    -H Accept:application/json \
+    --data '
+{
+   "application_type" : "native",
+   "client_name" : "Desktop Chat App",
+   "client_uri" : "https://app.example.org/",
+   "contacts" : [
+      "support@example.org"
+   ],
+   "policy_uri" : "https://app.example.org/about/privacy",
+   "redirect_uris" : [
+      "http://localhost:8080/redirect",
+      "org.example.app:/redirect"
+   ],
+   "scope" : "xmpp",
+   "software_id" : "32a0a8f3-4016-5478-905a-c373156eca73",
+   "software_version" : "3.4.1",
+   "tos_uri" : "https://app.example.org/about/terms"
+}
+'
+```
+
 ### Supported flows
 
 -   Authorization Code grant, optionally with Proof Key for Code Exchange