Auth0\SDK\Auth0JWT::decode PHP Method

decode() public static method

public static decode ( $jwt, $valid_audiences, $client_secret, array $authorized_iss = [], $cache = null )
$authorized_iss array
    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);
    }

Usage Example

 public function decodeJWT($encUser)
 {
     $client_id = config('laravel-auth0.client_id');
     $client_secret = config('laravel-auth0.client_secret');
     $this->apiuser = Auth0JWT::decode($encUser, $client_id, $client_secret);
     return $this->apiuser;
 }
All Usage Examples Of Auth0\SDK\Auth0JWT::decode
Auth0JWT