def request_hook(self, method, path, data, params, **kwargs):
    '\n        Used by Jira Client to apply the jira-cloud authentication\n        '
    url_params = dict(parse_qs(urlsplit(path).query))
    url_params.update((params or {}))
    path = path.split('?')[0]
    jwt_payload = {'iss': JIRA_KEY, 'iat': datetime.datetime.utcnow(), 'exp': (datetime.datetime.utcnow() + datetime.timedelta(seconds=(5 * 60))), 'qsh': get_query_hash(path, method.upper(), url_params)}
    encoded_jwt = jwt.encode(jwt_payload, self.shared_secret)
    params = dict(jwt=encoded_jwt, **(url_params or {}))
    request_spec = kwargs.copy()
    request_spec.update(dict(method=method, path=path, data=data, params=params))
    return request_spec
Used by Jira Client to apply the jira-cloud authentication
def request_hook(self, method, path, data, params, **kwargs):
    '\n        \n        '
    url_params = dict(parse_qs(urlsplit(path).query))
    url_params.update((params or {}))
    path = path.split('?')[0]
    jwt_payload = {'iss': JIRA_KEY, 'iat': datetime.datetime.utcnow(), 'exp': (datetime.datetime.utcnow() + datetime.timedelta(seconds=(5 * 60))), 'qsh': get_query_hash(path, method.upper(), url_params)}
    encoded_jwt = jwt.encode(jwt_payload, self.shared_secret)
    params = dict(jwt=encoded_jwt, **(url_params or {}))
    request_spec = kwargs.copy()
    request_spec.update(dict(method=method, path=path, data=data, params=params))
    return request_spec