public function PasswordGrantTest::testThatPasswordGrantRealmLoginEnforcesRealm in Auth0 Single Sign On 8.2
File
- vendor/
auth0/ auth0-php/ tests/ API/ Authentication/ PasswordGrantTest.php, line 89
Class
- PasswordGrantTest
- Class PasswordGrantTest Tests the Authentication API class, specifically password grants.
Namespace
Auth0\Tests\API\AuthenticationCode
public function testThatPasswordGrantRealmLoginEnforcesRealm() {
$api = new Authentication('test-domain.auth0.com');
try {
$caught_exception = false;
$api
->login([
'username' => uniqid(),
'password' => uniqid(),
]);
} catch (ApiException $e) {
$caught_exception = $this
->errorHasString($e, 'realm is mandatory');
}
$this
->assertTrue($caught_exception);
}