From 8318f35c44653ea9548395502f507058b6ed31cb Mon Sep 17 00:00:00 2001
From: Julian <julian@cccv.de>
Date: Sun, 27 Feb 2022 00:55:38 +0100
Subject: [PATCH] Fix request method of token request

RFC6749 mandates use of POST instead of GET which was previously used.
---
 auth.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/auth.php b/auth.php
index 6aa5282..e188785 100644
--- a/auth.php
+++ b/auth.php
@@ -41,7 +41,7 @@ class auth_plugin_authuffd extends DokuWiki_Auth_Plugin
 			'code' => $INPUT->get->str('code'),
 			'redirect_uri' => $this->getOAuth2RedirectURI()
 		);
-		$ok = $http->get($this->getConf('baseurl') . '/oauth2/token?' . http_build_query($params, '', '&', PHP_QUERY_RFC3986));
+		$ok = $http->post($this->getConf('baseurl') . '/oauth2/token', $params);
 		if (!$ok || $http->status != 200)
 			return false;
 		return json_decode($http->resp_body)->access_token;
-- 
GitLab