Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

OAuth Authentication using JIRA REST Java Client 2.0.0-m31

Piyush Khera January 5, 2015

I am trying to use JRJC v2.0.0-m31 provided by Atlassian. I cannot find any OAuthAuthenticationHandler to create REST clients using OAuth authentication.

Could anyone help me with an example on how to create a JIRA REST client using OAuth authentication?

Thanks

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Zubaidullou January 5, 2015

Hi Piyush Khera,

You can use JiraRestClient without using OAuth.

JiraRestClient restClient = new JiraRestClient(URI, user, password);
restClient.getSearchClient().......etc.
Piyush Khera January 5, 2015

I wish I could. But I need to authorize another application to access JIRA using the REST client using the OAuth access token

Piyush Khera March 17, 2015

Yes this works but I need to integrate this with the JIRA REST Java Client v2.0.0-m31 library. Any idea how I can create an OAuthAuthenticationHandler?

Zubaidullou March 17, 2015

I used, Java Client 0.6-m8 library. I created another application that gets any data from Jira Server. Try with Java Client 0.8-m8 library. Here an example: http://zubaidullo.weebly.com/zubaidullos-blog/using-jira-rest-java-client

Guy Rouillier March 18, 2015

The example I posted works with JIRA REST Java Client v2.0.0-m31. That's what we are using.

Piyush Khera March 18, 2015

@Guy Rouillier Could you please give me a sample code that uses OAuth authentication with JRJC?

Guy Rouillier March 18, 2015

Piyush, see the link I provide in my first comment here. I provide sample code in the comment section on that page. Let me know if you have any questions following my example.

Piyush Khera March 19, 2015

The link in your comment https://ecosystem.atlassian.net/wiki/display/JRJC/Home%29 which gives a 404.

Guy Rouillier March 19, 2015

Fixed. That's just a link to JRJC, which you presumably already have. My contribution is the message that shows how to access it when using OAuth.

TAGS
AUG Leaders

Atlassian Community Events