From 0ebe83c96e7323db1e40597ec51dec5381b65201 Mon Sep 17 00:00:00 2001 From: Colin Mollenhour Date: Thu, 4 Apr 2024 23:23:22 -0400 Subject: [PATCH] Add ability to bypass oauth gateway to avoid endless loop --- lib/Plugin/Abstract.php | 3 +-- lib/Plugin/Interface.php | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/Plugin/Abstract.php b/lib/Plugin/Abstract.php index 37df43c..4072e68 100644 --- a/lib/Plugin/Abstract.php +++ b/lib/Plugin/Abstract.php @@ -137,10 +137,9 @@ public function oauthHandleRedirect($request) {} * @param array $params * @return string */ - public function oauthGetRedirectUrl($params = array()) + public function oauthGetRedirectUrl($area = NULL, $bypassGateway = FALSE) { $params = array_merge( - $params, ['plugin' => $this->code], ['action' => 'redirect'] ); diff --git a/lib/Plugin/Interface.php b/lib/Plugin/Interface.php index 511822a..f099c45 100644 --- a/lib/Plugin/Interface.php +++ b/lib/Plugin/Interface.php @@ -36,7 +36,7 @@ function oauthHandleRedirect($request); * @param null|string $area * @return string */ - function oauthGetRedirectUrl($area = NULL); + function oauthGetRedirectUrl($area = NULL, $bypassGateway = FALSE); /** * @param array $stateData @@ -106,7 +106,7 @@ function oauthTest(); function hasConnectionConfig(); /** - * throws Plugin_Exception + * @throws Plugin_Exception */ function connectionDiagnostics(bool $super): array;