Recently we have just performed a full re-install of Tuleap since our old one was quite out of date. We held off so long on upgrading because every time we tried, afterwards, the Eclipse Mylyn Tuleap plugin would start failing.
Now we have a new OS, new server, new Tuleap, new server admin, new Eclipse, new SSL, and basically new everything else too. Now that everything is brand spankin new I can truly confirm Eclipse can't connect to the new Tuleap. We still have our older Tuleap and Eclipse connects just fine.
Here is the response from our new tuleap in eclipse:
POST /api/v1/tokens
body:
{"username":"someUser","password":"(hidden in debug)"}
________
response:
HTTP/1.1 201 Created
body:{"user_id":100,"token":"sometoken","uri":"tokens\/sometoken"}
An exception stack trace is not available.
Now here is the response from our old Tuleap:
POST /api/v1/tokens
body:
{"username":"someUser","password":"(hidden in debug)"}
________
response:
HTTP/1.1 200 OK
body:
{"user_id": 100,"token": "sometoken","uri": "tokens/sometoken"}
Now why in the heck does the newer tuleap return a 201 and the older one returns a 200? The fact both will return a valid token is really weird. I used both tokens from eclipses attempt at logging in, then used some curl to test them out and I received all kinds of data back from new and old.
I think it has something to do with the "/api/v1/tokens" enpoint. On all the docs for the API I see it is 3.x now. Also the docs say a token is at the "/api/tokens" endpoint, i.e. no v1 in the enpoint.
The following commands are both on the new tuleap and they kinda show the issue:
- this one does not have the v1 and it works with a 200 response.
curl -XPOST --header 'Content-type: application/json' -d '{"username":"someuser", "password":"somepasword!"}' https://tuleap.example.com/api/tokens -i
- when the same command is run with the v1 you will receive a 201 response.
curl -XPOST --header 'Content-type: application/json' -d '{"username":"someuser", "password":"somepasword!"}' https://tuleap.example.com/api/v1/tokens -i
Is anyone else having this issue? Can anyone point me in the right direction to fix this?