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;
    }
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;
    }
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 ; }
Merge authentication headers into request options.

@param array $options The array of request options.
@param bool  $reset   Acquire a new token even if one is cached.

@return array The updated request options.
Merge authentication headers into request options .