public function hasValidSignature(Request $request)
    {
        $url = $request->url();

        $original = rtrim($url.'?'.Arr::query(
            Arr::except($request->query(), 'signature')
        ), '?');

        $expires = $request->query()['expires'] ?? null;

        $signature = \hash_hmac('sha256', $original, \call_user_func($this->keyResolver));

        return  \hash_equals($signature, (string) $request->query('signature', '')) &&
               ! ($expires && Carbon::now()->getTimestamp() > $expires);
    }