From 2e5b2fa808ca2793705069e56a3cc7e6631f9d9d Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 8 Jul 2017 19:28:12 +0200 Subject: Revert client_credentials grant types --- .../Controller/DeveloperControllerTest.php | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'tests/Wallabag') diff --git a/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php b/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php index 2caeccf5..e9e5ee3b 100644 --- a/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php @@ -34,7 +34,7 @@ class DeveloperControllerTest extends WallabagCoreTestCase $this->assertContains('My app', $alert[0]); } - public function testCreateTokenFromPasswords() + public function testCreateToken() { $client = $this->getClient(); $apiClient = $this->createApiClientForUser('admin'); @@ -56,26 +56,6 @@ class DeveloperControllerTest extends WallabagCoreTestCase $this->assertArrayHasKey('refresh_token', $data); } - public function testCreateTokenFromClientCredentialsOnly() - { - $client = $this->getClient(); - $apiClient = $this->createApiClientForUser('admin', ['client_credentials']); - - $client->request('POST', '/oauth/v2/token', [ - 'grant_type' => 'client_credentials', - 'client_id' => $apiClient->getPublicId(), - 'client_secret' => $apiClient->getSecret(), - ]); - - $this->assertSame(200, $client->getResponse()->getStatusCode()); - - $data = json_decode($client->getResponse()->getContent(), true); - $this->assertArrayHasKey('access_token', $data); - $this->assertArrayHasKey('expires_in', $data); - $this->assertArrayHasKey('token_type', $data); - // Client Credentials created-clients have no refresh tokens - } - public function testListingClient() { $this->logInAs('admin'); -- cgit v1.2.3