public function buildSynchronizerTokenPatternMiddleware(
        $path = 'X-XSRF-TOKEN',
        callable $rejectMiddleware = null
    ) {
        return (new $this->middlewareClass($this->tokenService))
            ->withGuard($rejectMiddleware)
            ->withAcceptParsedBodyToken($path)
            ->withAcceptMethods(['GET', 'OPTIONS']);
    }