mirror of
https://github.com/krateng/maloja.git
synced 2025-07-09 03:04:07 -04:00
Extracting host from request
This commit is contained in:
parent
a4722f9e55
commit
38d4716dc5
@ -34,6 +34,7 @@ class Audioscrobbler(APIHandler):
|
|||||||
auth = keys.get("a")
|
auth = keys.get("a")
|
||||||
timestamp = keys.get("t")
|
timestamp = keys.get("t")
|
||||||
apikey = keys.get("api_key")
|
apikey = keys.get("api_key")
|
||||||
|
host = keys.get("Host")
|
||||||
# expect username and password
|
# expect username and password
|
||||||
if user is not None and apikey is None:
|
if user is not None and apikey is None:
|
||||||
receivedToken = lastfmToken(password, timestamp)
|
receivedToken = lastfmToken(password, timestamp)
|
||||||
@ -107,4 +108,4 @@ def lastfmToken(password, ts):
|
|||||||
|
|
||||||
def checkPassword(receivedToken, expectedKey, ts):
|
def checkPassword(receivedToken, expectedKey, ts):
|
||||||
expectedToken = lastfmToken(expectedKey, ts)
|
expectedToken = lastfmToken(expectedKey, ts)
|
||||||
return receivedToken == expectedToken
|
return receivedToken == expectedToken
|
||||||
|
Loading…
x
Reference in New Issue
Block a user