forked from LBRYCommunity/lbry-sdk
use whole message to make hmac
This commit is contained in:
parent
4db3be345b
commit
7d04ae2237
1 changed files with 2 additions and 3 deletions
|
@ -3,6 +3,7 @@ import hmac
|
||||||
import hashlib
|
import hashlib
|
||||||
import yaml
|
import yaml
|
||||||
import os
|
import os
|
||||||
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -88,6 +89,4 @@ def initialize_api_key_file(key_path):
|
||||||
|
|
||||||
|
|
||||||
def get_auth_message(message_dict):
|
def get_auth_message(message_dict):
|
||||||
to_auth = message_dict.get('method').encode('hex')
|
return json.dumps(message_dict, sort_keys=True)
|
||||||
to_auth += str(message_dict.get('id')).encode('hex')
|
|
||||||
return to_auth.decode('hex')
|
|
Loading…
Reference in a new issue