# HG changeset patch # User Kim Alvefur # Date 1685108979 -7200 # Node ID 1bcf755c7bae0d14f138179b4eaac1a5e99339ef # Parent cae3bb3dd45f11015d2401167aa7f41878bc7f6d mod_http_oauth2: Add an example of client registration diff -r cae3bb3dd45f -r 1bcf755c7bae mod_http_oauth2/README.markdown --- 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