[web][kverify] use new api vesion
- data["mnt] is now a list of strings instead of string
This commit is contained in:
parent
23fa5ba1a6
commit
24f6c07553
1 changed files with 4 additions and 0 deletions
|
@ -43,12 +43,16 @@ class AuthVerifyer ():
|
||||||
user_data = json.loads(base64.b64decode(params))
|
user_data = json.loads(base64.b64decode(params))
|
||||||
if (time.time() - user_data["time"]) > 60:
|
if (time.time() - user_data["time"]) > 60:
|
||||||
return False, "Signature to old"
|
return False, "Signature to old"
|
||||||
|
elif user_data["domain"] != self.domain:
|
||||||
|
return False, "invalid domain"
|
||||||
except json.decoder.JSONDecodeError:
|
except json.decoder.JSONDecodeError:
|
||||||
# we shouldn't get here unless kioubit's service is misbehaving
|
# we shouldn't get here unless kioubit's service is misbehaving
|
||||||
return False, "invalid JSON"
|
return False, "invalid JSON"
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return False, "value not found in JSON"
|
return False, "value not found in JSON"
|
||||||
logging.debug(user_data)
|
logging.debug(user_data)
|
||||||
|
# use mnt[0] as mnt
|
||||||
|
user_data["mnt"] = user_data["mnt"][0]
|
||||||
return True, user_data
|
return True, user_data
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue