-
-
Notifications
You must be signed in to change notification settings - Fork 877
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
Create token auth option #991
Conversation
@skaiaa you think it would be possible to test this implementation on jira server? |
@studioj I tested the change manually with our automation scripts with Jira. Im not familiar with this repo, I can see only those tests: https://github.com/pycontribs/jira/blob/master/tests/tests.py and the file looks massive and scary - what is a proper process for adding unit/integration tests to the repo? |
Great! For testing oauth I was just wondering if it's possible for it to be tested on a local fresh install of jira server keeping in mind security and privacy |
@skaiaa I completely agree that the If I may suggest we make a new file called As @studioj mentioned, we use The Jira url is stored in the environment variable As the Jira instance is created fresh each time, I'm not sure how best we would get the auth token unless it remains constant. Happy to try and figure that out with you, maybe we might need to get a bit creative! |
Looks like we can use the REST API to generate a PAT: (@skaiaa could you maybe add me as a collaborator on your fork? I can try and help directly on that branch) |
@adehad Sure I will add you and we can work on this together. Sorry for not responsiveness, pretty crazy week at work, let's get this done in upcoming week. |
@skaiaa no worries, no pressure ! We all have stuff going on ! |
fc47ad0
to
b828a8f
Compare
also added contributions from another pull request Co-Authored-By: Alex Metzger <asm@asm.io>
20815f2
to
ceb0dd8
Compare
@ametzger can you give this branch a whirl and see if it works for you? |
* Added quick token_auth to client * Create TokenAuth class and properly implement token authorization * add test for bearer token auth Co-authored-by: Anna Przybycień <aprzybycien@atlassian.com> Co-authored-by: adehad <26027314+adehad@users.noreply.github.com> Co-authored-by: Alex Metzger <asm@asm.io>
I've implemented token based auth by adding proper class inheriting from AuthBase and adding basic_auth parameter to constructor. Results in adding header in form: "authorization" : "Bearer <token>".