aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJulien Veyssier <julien-nc@posteo.net>2023-06-20 11:54:43 +0200
committerJulien Veyssier <julien-nc@posteo.net>2023-10-05 14:24:02 +0200
commit807f173dec7288945fca98548e80e43d3e401d12 (patch)
tree72918c69010f20e6f70b2dd0215bc8bea051cc9f /tests
parentf3f2d9b9784ef3a9304543969a0a88cd1f1054d8 (diff)
downloadnextcloud-server-807f173dec7288945fca98548e80e43d3e401d12.tar.gz
nextcloud-server-807f173dec7288945fca98548e80e43d3e401d12.zip
make oauth2 authorization code expire after 10 minutes
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Controller/ClientFlowLoginControllerTest.php5
1 files changed, 4 insertions, 1 deletions
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
);
}