src/Security/Auth0Service.php
public function decodeJWT($encToken)
    {
        $config = [
            // The api_identifier setting could come through as an array or a string.
            'valid_audiences' => is_array($this->api_identifier) ? $this->api_identifier : [$this->api_identifier],
            'client_secret' => $this->api_secret,
            'authorized_iss' => [$this->authorized_issuer],
            'supported_algs' => $this->supported_algs,
            'secret_base64_encoded' => $this->secret_base64_encoded
        ];

        if (null !== $this->cache) {
            $config['cache'] = $this->cache;
        }

        $verifier = new JWTVerifier($config);

        return $verifier->verifyAndDecode($encToken);
    }
public function decodeJWT($encToken)
    {
        $config = [
            // The api_identifier setting could come through as an array or a string.
            'valid_audiences' => is_array($this->api_identifier) ? $this->api_identifier : [$this->api_identifier],
            'client_secret' => $this->api_secret,
            'authorized_iss' => [$this->authorized_issuer],
            'supported_algs' => $this->supported_algs,
            'secret_base64_encoded' => $this->secret_base64_encoded
        ];

        if (null !== $this->cache) {
            $config['cache'] = $this->cache;
        }

        $verifier = new JWTVerifier($config);

        return $verifier->verifyAndDecode($encToken);
    }
public function decodeJWT ( $ encToken ) { $ config = [ // The api_identifier setting could come through as an array or a string. 'valid_audiences' => is_array ( $ this -> api_identifier ) ? $ this -> api_identifier : [ $ this -> api_identifier ] , 'client_secret' => $ this -> api_secret , 'authorized_iss' => [ $ this -> authorized_issuer ] , 'supported_algs' => $ this -> supported_algs , 'secret_base64_encoded' => $ this -> secret_base64_encoded ] ; if ( null !== $ this -> cache ) { $ config [ 'cache' ] = $ this -> cache ; } $ verifier = new JWTVerifier ( $ config ) ; return $ verifier -> verifyAndDecode ( $ encToken ) ; }
Decodes the JWT and validate it

@return \stdClass
Decodes the JWT and validate it