Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the user to override the default signature method #1662

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ def __init__(
* access_token_secret -- OAuth access token secret to sign with the key
* consumer_key -- key of the OAuth application link defined in Jira
* key_cert -- private key file to sign requests with (should be the pair of the public key supplied to Jira in the OAuth application link)
* signature_method (Optional) -- The signature method to use with OAuth1. Defaults to oauthlib.oauth1.SIGNATURE_HMAC_SHA1

kerberos (bool): True to enable Kerberos authentication. (Default: ``False``)
kerberos_options (Optional[Dict[str,str]]): A dict of properties for Kerberos authentication.
Expand Down Expand Up @@ -3694,7 +3695,7 @@ def _create_oauth_session(self, oauth: dict[str, Any]):
oauth_instance = OAuth1(
oauth["consumer_key"],
rsa_key=oauth["key_cert"],
signature_method=SIGNATURE_HMAC_SHA1,
signature_method=oauth.get("signature_method", SIGNATURE_HMAC_SHA1),
resource_owner_key=oauth["access_token"],
resource_owner_secret=oauth["access_token_secret"],
)
Expand Down Expand Up @@ -3847,7 +3848,9 @@ def _find_for_resource(
Args:
resource_cls (Any): Any instance of :py:class`Resource`
ids (Union[Tuple[str, str], int, str]): The arguments to the Resource's ``find()``
expand ([type], optional): The value for the expand property in the Resource's ``find()`` params. Defaults to None.
expand ([type], optional): The value for the expand property in the Resource's ``find()`` params.

None.

Raises:
JIRAError: If the Resource cannot be found
Expand Down