Create jiraRestClient based on oauth

Hey all,
I want to connect my server through oauth protocol.
I want to use v4.0.0
I have all parameters relevant for this process:
consumer key, private key and access token.
but how should I create a relevant jiraRestClient?
I realized I need to implement AuthenticationHandler with placing all right parameters…
Really need some help with that :slight_smile:
thanks
Lital

  • a working example - would be priceless for me

Hi, @lital.halawi.

Kindly check this documentation about OAuth for REST APIs.

For a working sample, you can check this repository. I personally tried the Java sample and it worked for me. The sample code might be able to guide you with what you want to achieve.

Cheers!
Ian

hey,
thanks for the link.
but - I would like to use Jira library in order to connect with my jira server. -jrjc.
I got to the point when I need to create a new authenticationHandler and override configure method.

JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
URI jiraUri = new URI(JIRA_URL);
AuthenticationHandler auth = new AuthenticationHandler() {}