Hi,
I have a plugin in Jira that i created.
Some of the functionality is, that i use HTTP requests (GET, PUT, POST) from Jira to Bitbucket and Bamboo.
For example:
public JSONObject checkForStgPrdDiff(String project, String repository, String from, String to) throws Exception {
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://stash.checkpoint.com/rest/api/1.0/projects/"+project+"/repos/"+repository+"/compare/commits?from="+from+"&to="+to+"&limit=10000")
.get()
.addHeader("authorization", "Basic " + myCredentials)
.addHeader("content-type", "application/json")
.build();
okhttp3.Response response = client.newCall(request).execute();
JSONObject jsonObject = new JSONObject(response.body().string());
return jsonObject;
}
The things is, that i am not the only person in my company uses this plugin.
So by putting my credentials in the function, the other users get the data by login using my credentials (behind the scene).
Is there a way to perform HTTP request with authentication in a different way?
A way that will connect to Bitbucket and Bamboo using each user credentials and no my?
Thanks,
Nir
Community moderators have prevented the ability to post new answers.
Dear @Nir Haimov,
best you ask this question again on https://community.developer.atlassian.com/
So long
Thomas
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.