dapplo / Dapplo.Jira

This is a simple REST based JIRA client, written for Greenshot, by using Dapplo.HttpExtension
MIT License
35 stars 14 forks source link

Improve OAuth support #4

Open Lakritzator opened 8 years ago

Lakritzator commented 8 years ago

As documented here: https://jira.atlassian.com/browse/JRA-43171 JIRA doesn't support OAuth 2.0

Today I added OAuth 1.0a support, which I got working and use the information here for testing: https://bitbucket.org/atlassian_tutorial/atlassian-oauth-examples/src/d625161454d1?at=default I used the public key from that repository to setup a test link on my Jira Cloud server, and use the private key in my test case.

The code for testing is here (it's commented out, as the OAuth process opens a browser, which is bad on the test-server) https://github.com/dapplo/Dapplo.Jira/blob/master/Dapplo.Jira.Tests/JiraOAuthTests.cs

I am still looking at a way to make the certificate/private key reading easier, but in a way this is not the job for the library itself...

magnello commented 6 years ago

Hello

I am using this library for accessing a Jira environment. Originally the code was developed using Basic Authentication, however our client has requested that we use OAuth. I am able to obtain an access token which I provide in creating a client and use that client to read a list of projects from the target Jira environment. I followed the test example, setting the token properties to Access Token, Access Token Secret and verifier code from the authentication process. Unfortunately when I send a request for a list of projects I receive a 401 error. Any thoughts as to settings I may be missing?

best regards

Mike