{"action":"created","issue":{"url":"https://api.github.com/repos/dough10/PolySonic/issues/43","labels_url":"https://api.github.com/repos/dough10/PolySonic/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/dough10/PolySonic/issues/43/comments","events_url":"https://api.github.com/repos/dough10/PolySonic/issues/43/events","html_url":"https://github.com/dough10/PolySonic/issues/43","id":101185683,"number":43,"title":"API version and authentication","user":{"login":"spl0k","id":2974943,"avatar_url":"https://avatars.githubusercontent.com/u/2974943?v=3","gravatar_id":"","url":"https://api.github.com/users/spl0k","html_url":"https://github.com/spl0k","followers_url":"https://api.github.com/users/spl0k/followers","following_url":"https://api.github.com/users/spl0k/following{/other_user}","gists_url":"https://api.github.com/users/spl0k/gists{/gist_id}","starred_url":"https://api.github.com/users/spl0k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spl0k/subscriptions","organizations_url":"https://api.github.com/users/spl0k/orgs","repos_url":"https://api.github.com/users/spl0k/repos","events_url":"https://api.github.com/users/spl0k/events{/privacy}","received_events_url":"https://api.github.com/users/spl0k/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dough10/PolySonic/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"dough10","id":7014926,"avatar_url":"https://avatars.githubusercontent.com/u/7014926?v=3","gravatar_id":"","url":"https://api.github.com/users/dough10","html_url":"https://github.com/dough10","followers_url":"https://api.github.com/users/dough10/followers","following_url":"https://api.github.com/users/dough10/following{/other_user}","gists_url":"https://api.github.com/users/dough10/gists{/gist_id}","starred_url":"https://api.github.com/users/dough10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dough10/subscriptions","organizations_url":"https://api.github.com/users/dough10/orgs","repos_url":"https://api.github.com/users/dough10/repos","events_url":"https://api.github.com/users/dough10/events{/privacy}","received_events_url":"https://api.github.com/users/dough10/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-08-15T15:40:33Z","updated_at":"2015-08-16T14:00:58Z","closed_at":null,"body":"PolySonic seems to make API calls with conflicting parameters.\r\nBy looking at the URLs it constructs, we can notice the following:\r\n- the first request (`/rest/ping.view`, to login) uses the `u`and `p` parameters for authentication, with the password sent as clear text, and `v` with a value of *1.11.0*\r\n- subsequent requests use the version sent back by the server for `v` and the `u`, `t` and `s` parameters for authentication, regardless of the API version supported by the server.\r\n\r\nFirst of all, because PolySonic uses of those `t` and `s` parameters for authentication it should advertise itself as using API version *1.13.0* since they were introduced with this version.\r\n\r\nNext, if the server responds to the first ping with a version inferior to *1.13.0*, I suggest PolySonic should fallback to using the `p` parameter for authentication and restrict the API calls it can make to the ones that were available with this specific version.\r\nNot doing so would cause servers using earlier versions of the API (such as my implementation: [Supysonic](https://github.com/spl0k/supysonic), using version *1.8.0*) to not be able to work with PolySonic. This can also be the cause of the infinite spinner mentioned in #37."},"comment":{"url":"https://api.github.com/repos/dough10/PolySonic/issues/comments/131554066","html_url":"https://github.com/dough10/PolySonic/issues/43#issuecomment-131554066","issue_url":"https://api.github.com/repos/dough10/PolySonic/issues/43","id":131554066,"user":{"login":"dough10","id":7014926,"avatar_url":"https://avatars.githubusercontent.com/u/7014926?v=3","gravatar_id":"","url":"https://api.github.com/users/dough10","html_url":"https://github.com/dough10","followers_url":"https://api.github.com/users/dough10/followers","following_url":"https://api.github.com/users/dough10/following{/other_user}","gists_url":"https://api.github.com/users/dough10/gists{/gist_id}","starred_url":"https://api.github.com/users/dough10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dough10/subscriptions","organizations_url":"https://api.github.com/users/dough10/orgs","repos_url":"https://api.github.com/users/dough10/repos","events_url":"https://api.github.com/users/dough10/events{/privacy}","received_events_url":"https://api.github.com/users/dough10/received_events","type":"User","site_admin":false},"created_at":"2015-08-16T14:00:58Z","updated_at":"2015-08-16T14:00:58Z","body":"That function is really a big help. Thanks"}}