public function RefreshTokenTest::testThatClientSecretIsRequired in Auth0 Single Sign On 8.2
Test that setting an empty client_secret will override the default and throw an exception.
File
- vendor/
auth0/ auth0-php/ tests/ API/ Authentication/ RefreshTokenTest.php, line 65
Class
- RefreshTokenTest
- Class RefreshTokenTest. Tests the \Auth0\SDK\API\Authentication::refresh_token() method.
Namespace
Auth0\Tests\API\AuthenticationCode
public function testThatClientSecretIsRequired() {
$env = self::getEnv();
$api = new Authentication($env['DOMAIN'], $env['APP_CLIENT_ID'], $env['APP_CLIENT_SECRET']);
try {
$api
->refresh_token(uniqid(), [
'client_secret' => '',
]);
$caught_exception = false;
} catch (ApiException $e) {
$caught_exception = $this
->errorHasString($e, 'client_secret is mandatory');
}
$this
->assertTrue($caught_exception);
}