public function ClientCredentialsTest::testOauthToken in Auth0 Single Sign On 8.2
File
- vendor/
auth0/ auth0-php/ tests/ API/ Authentication/ ClientCredentialsTest.php, line 10
Class
Namespace
Auth0\Tests\API\AuthenticationCode
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']));
}