Skip to content
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def _get_canonicalized_resource_query(request):

def _add_authorization_header(self, request, string_to_sign):
try:
signature = sign_string(self.account_key, string_to_sign)
padding = '=' * (4 - len(self.account_key) % 4)
signature = sign_string(self.account_key + padding, string_to_sign)
auth_string = 'SharedKey ' + self.account_name + ':' + signature
request.http_request.headers['Authorization'] = auth_string
except Exception as ex:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def _get_canonicalized_resource_query(request):

def _add_authorization_header(self, request, string_to_sign):
try:
signature = sign_string(self.account_key, string_to_sign)
padding = '=' * (4 - len(self.account_key) % 4)
signature = sign_string(self.account_key + padding, string_to_sign)
auth_string = 'SharedKey ' + self.account_name + ':' + signature
request.http_request.headers['Authorization'] = auth_string
except Exception as ex:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def _get_canonicalized_resource_query(request):

def _add_authorization_header(self, request, string_to_sign):
try:
signature = sign_string(self.account_key, string_to_sign)
padding = '=' * (4 - len(self.account_key) % 4)
signature = sign_string(self.account_key + padding, string_to_sign)
auth_string = 'SharedKey ' + self.account_name + ':' + signature
request.http_request.headers['Authorization'] = auth_string
except Exception as ex:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def _get_canonicalized_resource_query(request):

def _add_authorization_header(self, request, string_to_sign):
try:
signature = sign_string(self.account_key, string_to_sign)
padding = '=' * (4 - len(self.account_key) % 4)
signature = sign_string(self.account_key + padding, string_to_sign)
auth_string = 'SharedKey ' + self.account_name + ':' + signature
request.http_request.headers['Authorization'] = auth_string
except Exception as ex:
Expand Down