1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-11-09 19:52:16 +00:00

HTTP Basic authentication support

This commit is contained in:
Alban 2012-12-05 23:38:35 +01:00
parent 7477e549f7
commit d5ae79778d

View File

@ -39,6 +39,9 @@ def authorize():
error = request.error_formatter(40, 'Unauthorized'), 401
if request.authorization and UserManager.try_auth(request.authorization.username, request.authorization.password)[0] == UserManager.SUCCESS:
return
(username, decoded_pass) = map(request.args.get, [ 'u', 'p' ])
if not username or not decoded_pass:
return error