diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-12-06 15:23:28 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-12-06 21:14:34 +0100 |
commit | 1e6711305a9cca956a76f7a0097721a409a2b845 (patch) | |
tree | c257a6368b0b87edb719b5cce422f8e4fdd19b14 /apps/oauth2/tests | |
parent | bc35bf14f08f6b91065377d4741762ccfba63814 (diff) | |
download | nextcloud-server-1e6711305a9cca956a76f7a0097721a409a2b845.tar.gz nextcloud-server-1e6711305a9cca956a76f7a0097721a409a2b845.zip |
Fail gracefull if an unkown oauth2 client tries to authenticate
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/oauth2/tests')
-rw-r--r-- | apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php | 7 |
1 files changed, 6 insertions, 1 deletions
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 ); } |