From 8402a0a26ef3854219bad734acf5d69368f25ee5 Mon Sep 17 00:00:00 2001 From: lolo Date: Tue, 4 Jan 2022 01:47:35 +0800 Subject: [PATCH 1/4] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0641ae9..2e4a422 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "require": { "php": ">=7.2", "simplesamlphp/composer-module-installer": "~1.0", - "simplesamlphp/simplesamlphp": "dev-master", + "simplesamlphp/simplesamlphp": "^2.0.0-beta.2", "webmozart/assert": "^1.4" }, "require-dev": { From 7587399924230bedd34b4ea3eeb1efcf5afa1ca8 Mon Sep 17 00:00:00 2001 From: lolo Date: Tue, 4 Jan 2022 03:03:08 +0800 Subject: [PATCH 2/4] Update Discourse.php --- lib/Auth/Source/Discourse.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Auth/Source/Discourse.php b/lib/Auth/Source/Discourse.php index e581399..9e01a14 100644 --- a/lib/Auth/Source/Discourse.php +++ b/lib/Auth/Source/Discourse.php @@ -70,7 +70,7 @@ public function __construct(array $info, array $config) * @param array &$state Information about the current authentication. * @return void */ - public function authenticate(&$state) + public function authenticate(array &$state): void { assert(is_array($state)); @@ -102,7 +102,9 @@ public function authenticate(&$state) $discourseSsoUrl = $this->url . "/session/sso_provider?$query"; // Redirect user to Discourse SSO - Utils\HTTP::redirectTrustedURL($discourseSsoUrl); + $httpUtils = new Utils\HTTP(); + $httpUtils->redirectTrustedURL($discourseSsoUrl); + } From 23cf196e9b00f46599c2986d0de3ff7a25bc0c48 Mon Sep 17 00:00:00 2001 From: lolo Date: Tue, 4 Jan 2022 03:05:26 +0800 Subject: [PATCH 3/4] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2e4a422..0641ae9 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "require": { "php": ">=7.2", "simplesamlphp/composer-module-installer": "~1.0", - "simplesamlphp/simplesamlphp": "^2.0.0-beta.2", + "simplesamlphp/simplesamlphp": "dev-master", "webmozart/assert": "^1.4" }, "require-dev": { From b763ad1e4c72551d9ef4cd120d433c1565917e23 Mon Sep 17 00:00:00 2001 From: RailForWork <90138348+RailForWork@users.noreply.github.com> Date: Wed, 5 Jan 2022 14:04:45 +0800 Subject: [PATCH 4/4] Update lib/Auth/Source/Discourse.php Co-authored-by: Paul B. --- lib/Auth/Source/Discourse.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Auth/Source/Discourse.php b/lib/Auth/Source/Discourse.php index 9e01a14..5dc4147 100644 --- a/lib/Auth/Source/Discourse.php +++ b/lib/Auth/Source/Discourse.php @@ -102,9 +102,8 @@ public function authenticate(array &$state): void $discourseSsoUrl = $this->url . "/session/sso_provider?$query"; // Redirect user to Discourse SSO - $httpUtils = new Utils\HTTP(); - $httpUtils->redirectTrustedURL($discourseSsoUrl); - + $httpUtils = new Utils\HTTP(); + $httpUtils->redirectTrustedURL($discourseSsoUrl); }