Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Fix broken code #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sso.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

def hyvorTalkSignon(user):
userData = base64.b64encode(json.dumps(user).encode()).decode()
hash = hmac.new(HYVOR_TALK_SSO_PRIVATE_KEY, userData.encode(), sha1).hexdigest().rstrip("\n")
hash = hmac.new(HYVOR_TALK_SSO_PRIVATE_KEY, userData.encode(), digestmod="sha1").hexdigest().rstrip("\n")

return {
'hash': hash,
Expand Down Expand Up @@ -43,4 +43,4 @@ def hyvorTalkSignon(user):
<script async type="text/javascript" src="//talk.hyvor.com/web-api/embed"></script>""" % {
'hash': signon['hash'],
'userData': signon['userData'],
}
}