private function mergeAuth(array $options, bool $reset = false): array
    {
        if (!isset($options['query'])) {
            $options['query'] = [];
        }
        $token = $this->userSession->acquireToken($this->duration, $reset);
        $options['query'] += [
            'token' => $token->getValue(),
        ];

        return $options;
    }