fix: Rename config option to skipAuthPickerApplications to match what it does

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/49670/head
Côme Chilliet 2024-12-19 10:49:36 +07:00 committed by Côme Chilliet
parent f52b4c5eb2
commit 75f8bb51ed
2 changed files with 4 additions and 4 deletions

@ -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

@ -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())