Python library for Jira OAuth
Create RSA private key and store it in file oauth.pem
$ openssl genrsa -out oauth.pem 1024
Create RSA public key and store it in file oauth.pub
$ openssl rsa -in oauth.pem -pubout -out oauth.pub
Share RSA public key oauth.pub with your Jira Admin, as they need it during Jira Application Link creation.
Create starter_oauth.config in ~/.oauthconfig folder:
[oauth_config]
jira_url=https://jira.example.com
consumer_key=jira-oauth1-rest-api-access
test_jira_issue=IDEV-1
$ jira-oauth
Request Token: oauth_token=6AOSSREyS9HaACqEcHjcD6RJVms2NjEr, oauth_token_secret=gnpJMfbgUyG8W4dKzFW4PKFbGttV2CWm
Go to the following link in your browser: https://jira.example.com/plugins/servlet/oauth/authorize?oauth_token=6AOSSREyS9HaACqEcHjcD6RJVms2NjEr Have you authorized me? (y/n) y
Access Token: oauth_token=lmOh7LEdvZ2yxKIm5rdQY2ZfZqNdvUV4, oauth_token_secret=gnpJMfbgUyG8W4dKzFW4PKFbGttV2CWm You may now access protected resources using the access tokens above.
Accessing IDEV-1 using generated OAuth tokens: Success! Issue key: IDEV-1, Summary: Internal Devepment Issue #1
## Run with Docker
cp -R ~/.oauthconfig ./
docker build -t jira-oauth .
docker run -p 8080:8080 -it --rm jira-oauth
## Credits
Thank you, Raju Kadam, for implementing https://github.com/rkadam/jira-oauth-generator