File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 22
33import json
44
5- from telesign . rest import RestClient
5+ from rest import RestClient
66
77PHONEID_RESOURCE = "/v1/phoneid/{phone_number}"
88
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments