From 75f8bb51ed6ed57a79d3c51c51ee6481db3d42b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 19 Dec 2024 10:49:36 +0100 Subject: [PATCH] fix: Rename config option to skipAuthPickerApplications to match what it does MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/oauth2/lib/Controller/LoginRedirectorController.php | 4 ++-- .../oauth2/tests/Controller/LoginRedirectorControllerTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/oauth2/lib/Controller/LoginRedirectorController.php b/apps/oauth2/lib/Controller/LoginRedirectorController.php index 481e3cdab53..db233e7956e 100644 --- a/apps/oauth2/lib/Controller/LoginRedirectorController.php +++ b/apps/oauth2/lib/Controller/LoginRedirectorController.php @@ -83,8 +83,8 @@ class LoginRedirectorController extends Controller { $this->session->set('oauth.state', $state); - if (in_array($client->getName(), $this->appConfig->getValueArray('oauth2', 'autoGrantApplications', []))) { - /* See ClientFlowLoginController::showAuthPickerPage */ + if (in_array($client->getName(), $this->appConfig->getValueArray('oauth2', 'skipAuthPickerApplications', []))) { + /** @see ClientFlowLoginController::showAuthPickerPage **/ $stateToken = $this->random->generate( 64, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS diff --git a/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php b/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php index adeb05158ed..afa5aae4f07 100644 --- a/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php +++ b/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php @@ -85,7 +85,7 @@ class LoginRedirectorControllerTest extends TestCase { $this->assertEquals($expected, $this->loginRedirectorController->authorize('MyClientId', 'MyState', 'code')); } - public function testAuthorizeSkipGrant(): void { + public function testAuthorizeSkipPicker(): void { $client = new Client(); $client->setName('MyClientName'); $client->setClientIdentifier('MyClientIdentifier'); @@ -110,7 +110,7 @@ class LoginRedirectorControllerTest extends TestCase { $this->appConfig ->expects(static::once()) ->method('getValueArray') - ->with('oauth2', 'autoGrantApplications', []) + ->with('oauth2', 'skipAuthPickerApplications', []) ->willReturn(['MyClientName']); $this->random ->expects(static::once())