You are here

class DeprecatedTest in Auth0 Single Sign On 8.2

Hierarchy

Expanded class hierarchy of DeprecatedTest

File

vendor/auth0/auth0-php/tests/API/Authentication/DeprecatedTest.php, line 7

Namespace

Auth0\Tests\API\Authentication
View 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

Namesort descending Modifiers Type Description Overrides
ApiTests::$env protected static property Environment variables.
ApiTests::getEnv protected static function Get all test suite environment variables.
DeprecatedTest::testAuthorizeWithRO public function
ErrorHelpers::errorHasString protected function Does an error message contain a specific string?