class DeprecatedTest 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\DeprecatedTest
Expanded class hierarchy of DeprecatedTest
File
- vendor/
auth0/ auth0-php/ tests/ API/ Authentication/ DeprecatedTest.php, line 7
Namespace
Auth0\Tests\API\AuthenticationView source
class DeprecatedTest extends ApiTests {
public function testAuthorizeWithRO() {
$this
->markTestSkipped('New applications do not provide this grant.');
$env = self::getEnv();
$api = new Authentication($env['DOMAIN'], $env['APP_CLIENT_ID']);
$response = $api
->authorize_with_ro('auth@test.com', '123456', 'openid email', 'Username-Password-Authentication');
$this
->assertArrayHasKey('id_token', $response);
$this
->assertArrayHasKey('access_token', $response);
$this
->assertArrayHasKey('token_type', $response);
$this
->assertEquals('bearer', $response['token_type']);
$userinfo = $api
->userinfo($response['access_token']);
$this
->assertArrayHasKey('email', $userinfo);
$this
->assertArrayHasKey('email_verified', $userinfo);
$this
->assertArrayHasKey('sub', $userinfo);
$this
->assertEquals('german@auth0.com', $userinfo['email']);
$this
->assertEquals('auth0|58adc60b82b0ca0774643eef', $userinfo['user_id']);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ApiTests:: |
protected static | property | Environment variables. | |
ApiTests:: |
protected static | function | Get all test suite environment variables. | |
DeprecatedTest:: |
public | function | ||
ErrorHelpers:: |
protected | function | Does an error message contain a specific string? |