Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using OAUTH2 to access user lira stories from a backend server

Deleted user July 25, 2019

Hi Guys,

Goal
We are working on a search engine for users to search for Jira issues. The flow will be like this:

1. User goes to our own search engine website.
2. User grants access to his/her Jira account (OAUTH2?).
3. The search box will become visible.
4. When the user submits a search, it will be submitted to our java backend server.
5. Our backend server will connect to the Jira API to fetch stories on behalf of the user.
6. Our backend server will return the response to the user with the search results based on the Jira API response.

So basically the browser of the user will never contact the Jira API directly since our backend server will sit in the middle.

Problem
I don't really know how we can achieve a flow, where the user approves our backend server to contact the Jira API in his/her behalf. Is there a flow for this / are there suggestions or examples that we can use? Please note that for every user the result will be different, because we fetch the stories for that user. Hardcoding log-in credentials in our backend will not work for this reason, we need to fetch stories for the user performing the search.

Thanks guys!

 

 

1 answer

0 votes
Thomas Deiler
Community Champion
July 29, 2019

Dear @[deleted] ,

it seems that you use Jira Server. You can use Basic Auth instead and ask the user to login to your server. Then all REST calls are done with the permissions of this logged in user.

So long

Thomas

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events