I am trying to use oauth to access jira, and I am reading this document: Welcome to jira-python's documentation.
But in this oauth part, I cannot figure out how I can get these parameters:
access_token, access_token_secret, consumer_key, key_cert
I too am using jira-python. Since jira-python uses requests and requests-oauthlib I used those same libraries to implement the OAuth 1 dance necessary to get the tokens.
First, setup JIRA:
rsa.pub
and rsa.pem
files). Your Python code will need access to the private key rsa.pem
.consumer_key
needed by jira-pythonNext, the OAuth dance. It's pretty simple with OAuth1Session
from requests-oauthlib. Here is a simple example (CLI): JIRA Oauth in Python.
The workflow is described in the requests-oauthlib docs: OAuth 1 Workflow.
So, to summarize:
rsa.pem
file (private key). The public key is also added when setting up the "Application Link" in JIRA admin.