Added subsonic server config for salt auth logic
Wanted to start a convo on adding this feature. Did a basic implementation on my side. Feedback on the commit is appreciated or if the project owner feels like they want to implement this differently thats fine too.
Allows users to toggle between the plain password auth and the salted auth. Salted auth is turned off by default since its only supported after Subsonic API 1.13.0
Basically from the subsonic api docs:
Starting with API version 1.13.0, the recommended authentication scheme is to send an authentication token, calculated as a one-way salted hash of the password.
I tested this with my personal gonic server. Below are some logs from when you switch from plain auth to salted auth.
airsonic | 2020/07/12 10:30:21 response 200 for `/rest/getAlbum.view?u=admin&c=Sublime+Music&f=json&v=1.15.0&p=REDACTED&id=al-1000`
airsonic | 2020/07/12 10:30:21 response 200 for `/rest/getAlbum.view?u=admin&c=Sublime+Music&f=json&v=1.15.0&p=REDACTED&id=al-1000`
airsonic | 2020/07/12 10:30:25 response 200 for `/rest/getAlbum.view?u=admin&c=Sublime+Music&f=json&v=1.15.0&p=REDACTED&id=al-290`
airsonic | 2020/07/12 10:30:25 response 200 for `/rest/getAlbum.view?u=admin&c=Sublime+Music&f=json&v=1.15.0&p=REDACTED&id=al-290`
airsonic | 2020/07/12 10:30:36 response 200 for `/rest/ping.view?u=admin&c=Sublime+Music&f=json&v=1.15.0&s=4smJH5mh&t=a26c32f4d47cdcc7a5d38daaf3956f9f`
airsonic | 2020/07/12 10:30:43 response 200 for `/rest/getAlbum.view?u=admin&c=Sublime+Music&f=json&v=1.15.0&s=z2AXuiKA&t=abf55b552571fca00b1192d7705439c2&id=al-180`
airsonic | 2020/07/12 10:30:43 response 200 for `/rest/getAlbum.view?u=admin&c=Sublime+Music&f=json&v=1.15.0&s=SPzKCi1m&t=afdb93e269b410a4d73bed7ecb10a690&id=al-180`
airsonic | 2020/07/12 10:30:47 response 200 for `/rest/getAlbum.view?u=admin&c=Sublime+Music&f=json&v=1.15.0&s=ZowZEuyB&t=748f75155fe4904eca9ae3a98eafe78b&id=al-289`
airsonic | 2020/07/12 10:30:47 response 200 for `/rest/getAlbum.view?u=admin&c=Sublime+Music&f=json&v=1.15.0&s=jrHLq3qF&t=a2297ebd7c3d31259f1d81150374e1bd&id=al-289`
Server config page with new option: