From 1e6711305a9cca956a76f7a0097721a409a2b845 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 6 Dec 2018 15:23:28 +0100 Subject: Fail gracefull if an unkown oauth2 client tries to authenticate Signed-off-by: Roeland Jago Douma --- apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apps/oauth2/tests') diff --git a/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php b/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php index 584e3ebed54..75096eefddd 100644 --- a/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php +++ b/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php @@ -26,6 +26,7 @@ use OCA\OAuth2\Controller\LoginRedirectorController; use OCA\OAuth2\Db\Client; use OCA\OAuth2\Db\ClientMapper; use OCP\AppFramework\Http\RedirectResponse; +use OCP\IL10N; use OCP\IRequest; use OCP\ISession; use OCP\IURLGenerator; @@ -44,6 +45,8 @@ class LoginRedirectorControllerTest extends TestCase { private $session; /** @var LoginRedirectorController */ private $loginRedirectorController; + /** @var IL10N */ + private $l; public function setUp() { parent::setUp(); @@ -52,13 +55,15 @@ class LoginRedirectorControllerTest extends TestCase { $this->urlGenerator = $this->createMock(IURLGenerator::class); $this->clientMapper = $this->createMock(ClientMapper::class); $this->session = $this->createMock(ISession::class); + $this->l = $this->createMock(IL10N::class); $this->loginRedirectorController = new LoginRedirectorController( 'oauth2', $this->request, $this->urlGenerator, $this->clientMapper, - $this->session + $this->session, + $this->l ); } -- cgit v1.2.3