Skip to content

Commit 7ff5bc6

Browse files
Pull request #4: Fix issue on get values of auth
Merge in SDK/python_telesign from hotfix/93272 to master * commit '3f234334467559ff1861035f0c15377500ad699a': Fix issue on get values of auth
2 parents 18a3dd1 + 3f23433 commit 7ff5bc6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
here = path.abspath(path.dirname(__file__))
1313

14-
version = "2.2.4"
14+
version = "2.2.5"
1515

1616
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
1717
long_description = f.read()

telesign/rest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ def generate_telesign_headers(customer_id,
119119
content_type = "application/x-www-form-urlencoded" if method_name in ("POST", "PUT") else ""
120120

121121
# Default auth_method is Digest if not explicitly specified
122-
if auth_method == AuthMethod.BASIC:
122+
if auth_method == AuthMethod.BASIC.value:
123123
usr_apikey = "{customer_id}:{api_key}".format(customer_id=customer_id,
124124
api_key=api_key)
125125
b64val = b64encode(usr_apikey.encode())
126-
authorization = "{auth_method} {b64val}".format(auth_method=AuthMethod.BASIC,
126+
authorization = "{auth_method} {b64val}".format(auth_method=AuthMethod.BASIC.value,
127127
b64val=b64val.decode())
128128
else:
129-
auth_method = AuthMethod.HMAC_SHA256
129+
auth_method = AuthMethod.HMAC_SHA256.value
130130

131131
string_to_sign_builder = ["{method}".format(method=method_name)]
132132

0 commit comments

Comments
 (0)