mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
The salt and token are now calculated at each new access starting from the password saved in the database, based on the type of access
This commit is contained in:
parent
cc9afb8057
commit
d408b82503
4 changed files with 38 additions and 38 deletions
|
|
@ -115,14 +115,15 @@ public class Subsonic {
|
|||
public Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("u", preferences.getUsername());
|
||||
params.put("s", preferences.getAuthentication().getSalt());
|
||||
params.put("t", preferences.getAuthentication().getToken());
|
||||
|
||||
if (preferences.getAuthentication().getPassword() != null) params.put("p", preferences.getAuthentication().getPassword());
|
||||
if (preferences.getAuthentication().getSalt() != null) params.put("s", preferences.getAuthentication().getSalt());
|
||||
if (preferences.getAuthentication().getToken() != null) params.put("t", preferences.getAuthentication().getToken());
|
||||
|
||||
params.put("v", getApiVersion().getVersionString());
|
||||
params.put("c", preferences.getClientName());
|
||||
params.put("f", "xml");
|
||||
|
||||
if (preferences.getPassword() != null && !preferences.getPassword().trim().equals("")) params.put("p", preferences.getPassword());
|
||||
|
||||
return params;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue