Skip to content

Commit 1b46631

Browse files
Fix issue method phoneid
1 parent 455d2c5 commit 1b46631

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

telesign/phoneid.py

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

33
import json
44

5-
from telesign.rest import RestClient
5+
from rest import RestClient
66

77
PHONEID_RESOURCE = "/v1/phoneid/{phone_number}"
88

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.value:
122+
if auth_method == AuthMethod.BASIC:
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.value,
126+
authorization = "{auth_method} {b64val}".format(auth_method=AuthMethod.BASIC,
127127
b64val=b64val.decode())
128128
else:
129-
auth_method = AuthMethod.HMAC_SHA256.value
129+
auth_method = AuthMethod.HMAC_SHA256
130130

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

0 commit comments

Comments
 (0)