fix: Remove skip of grant page, only skip first step

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2024-12-19 10:48:54 +01:00 committed by Côme Chilliet
parent cca0e84480
commit f52b4c5eb2
2 changed files with 0 additions and 10 deletions

View file

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

View file

@ -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,
);
}