class ClientCredentialsTest in Auth0 Single Sign On 8.2
Hierarchy
- class \Auth0\Tests\API\ApiTests extends \Auth0\Tests\API\PHPUnit_Framework_TestCase uses ErrorHelpers
- class \Auth0\Tests\API\Authentication\ClientCredentialsTest
Expanded class hierarchy of ClientCredentialsTest
File
- vendor/
auth0/ auth0-php/ tests/ API/ Authentication/ ClientCredentialsTest.php, line 7
Namespace
Auth0\Tests\API\AuthenticationView source
class ClientCredentialsTest extends ApiTests {
public function testOauthToken() {
$env = self::getEnv();
$api = new Authentication($env['DOMAIN'], $env['APP_CLIENT_ID'], $env['APP_CLIENT_SECRET']);
$token = $api
->client_credentials([
'audience' => 'https://' . $env['DOMAIN'] . '/api/v2/',
]);
$this
->assertArrayHasKey('access_token', $token);
$this
->assertArrayHasKey('token_type', $token);
$this
->assertEquals('bearer', strtolower($token['token_type']));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ApiTests:: |
protected static | property | Environment variables. | |
ApiTests:: |
protected static | function | Get all test suite environment variables. | |
ClientCredentialsTest:: |
public | function | ||
ErrorHelpers:: |
protected | function | Does an error message contain a specific string? |