Hey all,
I'm triyng to use the TM4J REST API to bulk clone test cycles in a ScriptRunner post-function script, and the script works and all but I've been only using it with basic authentication so far which will not be ideal in the long run. So I'd like to use OAuth for it, however, I have no idea how to make it work with the TM4J REST API. Here is how my basic API call is configured:
String baseUrl = ComponentAccessor.getApplicationProperties().getString(APKeys.JIRA_BASEURL)
HttpClient client = new HttpClient();
Credentials credentials = new UsernamePasswordCredentials("USENAME","PASSWORD");
client.getParams().setAuthenticationPreemptive(true);
client.getState().setCredentials(AuthScope.ANY, credentials);
This is what I'd like to substitute with OAuth, however I'm quite new to making REST API calls so it's quite complicated for me. I understand that I need to make an app link of some sort but even after reading the documentation (https://developer.atlassian.com/server/jira/platform/oauth/) I can't quite get it. Anyone mind helping me out here? :) Thanks a lot!