mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
More client credentials test
This commit is contained in:
16
tests/api/ClientCredentialsMissingClientSecretCept.php
Normal file
16
tests/api/ClientCredentialsMissingClientSecretCept.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('get an access token using the client credentials grant, missing client secret');
|
||||
$I->sendPOST(
|
||||
'client_credentials.php/access_token',
|
||||
[
|
||||
'grant_type' => 'client_credentials',
|
||||
'client_id' => 'myawesomeapp'
|
||||
]
|
||||
);
|
||||
$I->canSeeResponseCodeIs(400);
|
||||
$I->canSeeResponseIsJson();
|
||||
$I->seeResponseContainsJson([
|
||||
'error' => 'invalid_request',
|
||||
'message' => 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "client_secret" parameter.'
|
||||
]);
|
Reference in New Issue
Block a user