diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-12-19 10:49:36 +0100 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2025-01-07 10:34:30 +0100 |
commit | 75f8bb51ed6ed57a79d3c51c51ee6481db3d42b8 (patch) | |
tree | d539270b8f27d7b2267d7b29465a9233e6bd03fb /apps/oauth2 | |
parent | f52b4c5eb244c1a1f33b68b06189299f16fefad5 (diff) | |
download | nextcloud-server-75f8bb51ed6ed57a79d3c51c51ee6481db3d42b8.tar.gz nextcloud-server-75f8bb51ed6ed57a79d3c51c51ee6481db3d42b8.zip |
fix: Rename config option to skipAuthPickerApplications to match what it doesfeat/allow-oauth-grant-bypass
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/oauth2')
-rw-r--r-- | apps/oauth2/lib/Controller/LoginRedirectorController.php | 4 | ||||
-rw-r--r-- | apps/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()) |