Diff

mod_rest/example/rest.sh @ 5368:165ccec95585

mod_rest/rest.sh: Register as native application Otherwise the custom nonstandard URI would be rejected per the last commit to mod_http_oauth2
author Kim Alvefur <zash@zash.se>
date Tue, 25 Apr 2023 19:50:27 +0200
parent 5342:e28ba69b5307
child 5379:36d40f5b81fe
line wrap: on
line diff
--- a/mod_rest/example/rest.sh	Tue Apr 25 19:49:41 2023 +0200
+++ b/mod_rest/example/rest.sh	Tue Apr 25 19:50:27 2023 +0200
@@ -71,7 +71,7 @@
 	if [ -z "${OAUTH_CLIENT_INFO:-}" ]; then
 		# Register a new OAuth client
 		REGISTRATION_ENDPOINT="$(echo "$OAUTH_META" | jq -e -r '.registration_endpoint')"
-		OAUTH_CLIENT_INFO="$(http --check-status "$REGISTRATION_ENDPOINT" Content-Type:application/json Accept:application/json client_name=rest client_uri="https://modules.prosody.im/mod_rest" redirect_uris:='["urn:ietf:wg:oauth:2.0:oob"]')"
+		OAUTH_CLIENT_INFO="$(http --check-status "$REGISTRATION_ENDPOINT" Content-Type:application/json Accept:application/json client_name=rest client_uri="https://modules.prosody.im/mod_rest" application_type=native redirect_uris:='["urn:ietf:wg:oauth:2.0:oob"]')"
 		mkdir -p "${XDG_CACHE_HOME:-$HOME/.cache}/rest/"
 		typeset -p OAUTH_CLIENT_INFO >> "${XDG_CACHE_HOME:-$HOME/.cache}/rest/$HOST"
 	fi