mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-30 10:42:02 +05:30
14 lines
485 B
PHP
14 lines
485 B
PHP
<?php
|
|
$I = new AuthTester($scenario);
|
|
$I->wantTo('get an access token with client credentials');
|
|
$I->sendPOST('other_grants.php/access_token', [
|
|
'client_id' => 'testclient',
|
|
'client_secret' => 'secret',
|
|
'grant_type' => 'client_credentials'
|
|
]);
|
|
$I->seeResponseCodeIs(200);
|
|
$I->seeResponseIsJson();
|
|
$I->seeJsonKeyExists('expires_in');
|
|
$I->seeJsonKeyExists('access_token');
|
|
$I->seeResponseContainsJson(['token_type' => 'Bearer']);
|
|
$I->seeJsonKeyDoesNotExists('foobar'); |