From 807f173dec7288945fca98548e80e43d3e401d12 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Tue, 20 Jun 2023 11:54:43 +0200 Subject: make oauth2 authorization code expire after 10 minutes Signed-off-by: Julien Veyssier --- tests/Core/Controller/ClientFlowLoginControllerTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/Core/Controller/ClientFlowLoginControllerTest.php') diff --git a/tests/Core/Controller/ClientFlowLoginControllerTest.php b/tests/Core/Controller/ClientFlowLoginControllerTest.php index dfd3e629dcd..e340e81f342 100644 --- a/tests/Core/Controller/ClientFlowLoginControllerTest.php +++ b/tests/Core/Controller/ClientFlowLoginControllerTest.php @@ -31,6 +31,7 @@ use OCA\OAuth2\Db\Client; use OCA\OAuth2\Db\ClientMapper; use OCP\AppFramework\Http; use OCP\AppFramework\Http\StandaloneTemplateResponse; +use OCP\AppFramework\Utility\ITimeFactory; use OCP\Defaults; use OCP\EventDispatcher\IEventDispatcher; use OCP\IL10N; @@ -95,6 +96,7 @@ class ClientFlowLoginControllerTest extends TestCase { $this->accessTokenMapper = $this->createMock(AccessTokenMapper::class); $this->crypto = $this->createMock(ICrypto::class); $this->eventDispatcher = $this->createMock(IEventDispatcher::class); + $this->timeFactory = $this->createMock(ITimeFactory::class); $this->clientFlowLoginController = new ClientFlowLoginController( 'core', @@ -109,7 +111,8 @@ class ClientFlowLoginControllerTest extends TestCase { $this->clientMapper, $this->accessTokenMapper, $this->crypto, - $this->eventDispatcher + $this->eventDispatcher, + $this->timeFactory ); } -- cgit v1.2.3