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

Can I log into Jira from the REST API, e.g. using a token + redirect

Rudie December 7, 2015

I have a mobile JIRA (web) app, where users log in using their JIRA instance URL, username, and password (because HTTP Basic Auth is the only good auth method).

When they're browsing in the app, sometimes you have to go to the real JIRA, e.g. to download an attachment, or search through worklog history etc. (The app doesn't do everything.)

It's annoying to link to Jira, where they have to log in again, (and then find the relevant issue again, if redirection doesn't work).

Is there an SSO-like solution for this, with the REST API as starting point?

I'm thinking:

  1. An API endpoint that generates a one-time-login token.
  2. A redirect to the real JIRA instance, with that token, with a redirect/goto/destination URL.
  3. The user is now really logged in, and on the correct (issue) page.

I couldn't find anything in the REST API docs, but there might be other ways... I like hackish methods, so don't hesitate. Non-REST-API is fine too. Using a non-standard plugin is not fine.

4 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Rudie January 23, 2016

SSO never worked. API still uses HTTP Auth, and that's fine. There's no way to create a login token =(

0 votes
Chris Whitten [Comskil] January 23, 2016

@Rudie Dirkx I am trying to do the same thing but with Crowd and Confluence. I wanted to use php to create a crowd SSO token (which works) but when it comes time to try and use it with confluence I am stuck. Did you ever get a login to work with JIRA or confluence? Or was the basic auth only working with the api calls? Thanks

0 votes
Rudie January 12, 2016

I did not. I don't think it exists. Downloading attachments is possible through the API however: https://github.com/rudiedirkx/Jira/blob/master/attachment.php

0 votes
aditi January 12, 2016

Hi i'm also looking for the same , did u find the answer?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events