Skip to content

Commit 6817f55

Browse files
committed
fix: Rename config option to skipAuthPickerApplications to match what it does
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent cb2b49c commit 6817f55

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

apps/oauth2/lib/Controller/LoginRedirectorController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ public function authorize($client_id,
8181

8282
$this->session->set('oauth.state', $state);
8383

84-
if (in_array($client->getName(), $this->appConfig->getValueArray('oauth2', 'autoGrantApplications', []))) {
85-
/* See ClientFlowLoginController::showAuthPickerPage */
84+
if (in_array($client->getName(), $this->appConfig->getValueArray('oauth2', 'skipAuthPickerApplications', []))) {
85+
/** @see ClientFlowLoginController::showAuthPickerPage **/
8686
$stateToken = $this->random->generate(
8787
64,
8888
ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS

apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function testAuthorize(): void {
8585
$this->assertEquals($expected, $this->loginRedirectorController->authorize('MyClientId', 'MyState', 'code'));
8686
}
8787

88-
public function testAuthorizeSkipGrant(): void {
88+
public function testAuthorizeSkipPicker(): void {
8989
$client = new Client();
9090
$client->setName('MyClientName');
9191
$client->setClientIdentifier('MyClientIdentifier');
@@ -110,7 +110,7 @@ public function testAuthorizeSkipGrant(): void {
110110
$this->appConfig
111111
->expects(static::once())
112112
->method('getValueArray')
113-
->with('oauth2', 'autoGrantApplications', [])
113+
->with('oauth2', 'skipAuthPickerApplications', [])
114114
->willReturn(['MyClientName']);
115115
$this->random
116116
->expects(static::once())

0 commit comments

Comments
 (0)