public function TokenTest::testThatOtherAlgsThrowsException in Auth0 Single Sign On 8.2
Test unsupported algorithms in the config param.
Return value
void
File
- vendor/
auth0/ auth0-php/ tests/ API/ Helpers/ TokenGeneratorTest.php, line 72
Class
- TokenTest
- Class TokenTest
Namespace
Auth0\Tests\Api\HelpersCode
public function testThatOtherAlgsThrowsException() {
$caught_exception = false;
try {
new JWTVerifier([
'valid_audiences' => [
uniqid(),
],
'supported_algs' => [
'RS256',
'RS512',
],
]);
} catch (CoreException $e) {
$caught_exception = $this
->errorHasString($e, 'Cannot support the following algorithm(s): RS512');
}
$this
->assertTrue($caught_exception);
}