changeset 5488:9a4556a13cc7

mod_rest/example: Include 'application_type' in registration It defaults to "web", which in turn mandates https: redirect URIs, which would not work with this example using the OOB URI.
author Kim Alvefur <zash@zash.se>
date Fri, 26 May 2023 14:32:59 +0200
parents 6cf2f32dbf40
children a7188eb4ded4
files mod_rest/example/prosody_oauth.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_rest/example/prosody_oauth.py	Wed May 24 16:34:35 2023 +0200
+++ b/mod_rest/example/prosody_oauth.py	Fri May 26 14:32:59 2023 +0200
@@ -16,6 +16,9 @@
                 "client_name": client_name,
                 "client_uri": client_uri,
                 "redirect_uris": [redirect_uri],
+                "application_type": redirect_uri[:8] == "https://"
+                and "web"
+                or "native",
             },
         ).json()