Simple Login to JIRA API
Koka5 opened this issue · 0 comments
I have found that node-jira uses basic auth.
But is it possible only to login, then print the response body and not doing anything else?
In sort, i am seeking for the login API to jira in nodejs, after which i can console the response body containing successfull login html page.
I could not find login API anywhere in the repo.
However i have tried the following :
var request = require('request');
request({
protocol :
uri : 'http://myjira.com/login.jsp',
method: 'POST',
headers : { 'Content-type': 'application/x-www-form-urlencoded' },
body: 'os_username=shared&os_password=shared&os_destination=&atl_token=&login=Log+In'
},
function (err, response, body) {
console.log(body);
}
});
But i get the same page http://myjira.com/login.jsp without any error code.. (statusCode = 200)
with all the login form embedded in the page, instead of the loggedIn dashboard
Means it asks for login again.
whats wrong with it??