You are here

public static function Auth0JWT::decode in Auth0 Single Sign On 8.2

1 call to Auth0JWT::decode()
TokenTest::testDeprecatedTestTokenGenerationDecode in vendor/auth0/auth0-php/tests/API/Helpers/TokenGeneratorTest.php
Test the deprecated Auth0JWT::decode() method.

File

vendor/auth0/auth0-php/src/Auth0JWT.php, line 15

Class

Auth0JWT
This class provides access to Auth0 JWT decoder.

Namespace

Auth0\SDK

Code

public static function decode($jwt, $valid_audiences, $client_secret, array $authorized_iss = [], $cache = null) {
  $verifier = new JWTVerifier([
    'valid_audiences' => is_array($valid_audiences) ? $valid_audiences : [
      $valid_audiences,
    ],
    'client_secret' => $client_secret,
    'authorized_iss' => $authorized_iss,
    'cache' => $cache,
  ]);
  return $verifier
    ->verifyAndDecode($jwt);
}