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:
parent
7477e549f7
commit
d5ae79778d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user