ghengeveld / atlassian-crowd-client

Node.js API & Client for Atlassian Crowd REST API
https://github.com/ghengeveld/atlassian-crowd-client#atlassian-crowd-client
4 stars 5 forks source link

cannot authenticate with atlassian-crowd-client #6

Open faribajpr opened 6 years ago

faribajpr commented 6 years ago

I new in this and I get the error of Error: Invalid Response from Crowd, expecting JSON. should I change something? here is my code:

var crowd = new atlassianCrowdClient({
  baseUrl: 'http://account.tikab.org/crowd/console/login.action',
  application: {
    name: 'test-app',
    password: 'AbC123456'
  }
});
crowd.session.create('fariba.test@tikab.org', 'Aa123456')
    .then(function (session) {
      console.log('Crowd SSO token is ' + session.token);
    })
    .catch(function(err) {
        console.log('err' + err)
    })
faribajpr commented 6 years ago

@ghengeveld tnx! and how can I get users using this package? I think I don't understand it well