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:
17
tests/api/ClientCredentialsInvalidClientSecretCept.php
Normal file
17
tests/api/ClientCredentialsInvalidClientSecretCept.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('get an access token using the client credentials grant, invalid client secret');
|
||||
$I->sendPOST(
|
||||
'client_credentials.php/access_token',
|
||||
[
|
||||
'grant_type' => 'client_credentials',
|
||||
'client_id' => 'myawesomeapp',
|
||||
'client_secret' => 'foobar'
|
||||
]
|
||||
);
|
||||
$I->canSeeResponseCodeIs(401);
|
||||
$I->canSeeResponseIsJson();
|
||||
$I->seeResponseContainsJson([
|
||||
'error' => 'invalid_client',
|
||||
'message' => 'Client authentication failed.'
|
||||
]);
|
Reference in New Issue
Block a user