diff --git a/core/Controller/ClientFlowLoginController.php b/core/Controller/ClientFlowLoginController.php index 76f447f2101..8d84ac100fa 100644 --- a/core/Controller/ClientFlowLoginController.php +++ b/core/Controller/ClientFlowLoginController.php @@ -26,7 +26,6 @@ use OCP\Authentication\Exceptions\InvalidTokenException; use OCP\Authentication\Token\IToken; use OCP\Defaults; use OCP\EventDispatcher\IEventDispatcher; -use OCP\IAppConfig; use OCP\IL10N; use OCP\IRequest; use OCP\ISession; @@ -56,7 +55,6 @@ class ClientFlowLoginController extends Controller { private ICrypto $crypto, private IEventDispatcher $eventDispatcher, private ITimeFactory $timeFactory, - private IAppConfig $appConfig, ) { parent::__construct($appName, $request); } @@ -185,10 +183,6 @@ class ClientFlowLoginController extends Controller { /** @var IUser $user */ $user = $this->userSession->getUser(); - if (in_array($clientName, $this->appConfig->getValueArray('oauth2', 'autoGrantApplications', []))) { - return $this->generateAppPassword($stateToken, $clientIdentifier); - } - $response = new StandaloneTemplateResponse( $this->appName, 'loginflow/grant', diff --git a/tests/Core/Controller/ClientFlowLoginControllerTest.php b/tests/Core/Controller/ClientFlowLoginControllerTest.php index 3a7acd3afeb..1f4575208b8 100644 --- a/tests/Core/Controller/ClientFlowLoginControllerTest.php +++ b/tests/Core/Controller/ClientFlowLoginControllerTest.php @@ -22,7 +22,6 @@ use OCP\AppFramework\Http\StandaloneTemplateResponse; use OCP\AppFramework\Utility\ITimeFactory; use OCP\Defaults; use OCP\EventDispatcher\IEventDispatcher; -use OCP\IAppConfig; use OCP\IL10N; use OCP\IRequest; use OCP\ISession; @@ -49,7 +48,6 @@ class ClientFlowLoginControllerTest extends TestCase { private ICrypto&MockObject $crypto; private IEventDispatcher&MockObject $eventDispatcher; private ITimeFactory&MockObject $timeFactory; - private IAppConfig&MockObject $appConfig; private ClientFlowLoginController $clientFlowLoginController; @@ -75,7 +73,6 @@ class ClientFlowLoginControllerTest extends TestCase { $this->crypto = $this->createMock(ICrypto::class); $this->eventDispatcher = $this->createMock(IEventDispatcher::class); $this->timeFactory = $this->createMock(ITimeFactory::class); - $this->appConfig = $this->createMock(IAppConfig::class); $this->clientFlowLoginController = new ClientFlowLoginController( 'core', @@ -92,7 +89,6 @@ class ClientFlowLoginControllerTest extends TestCase { $this->crypto, $this->eventDispatcher, $this->timeFactory, - $this->appConfig, ); }