Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(storage): remove expiration strict conversion (#106)
Fixes #105
  • Loading branch information
HemangChothani committed Apr 16, 2020
1 parent f4de88d commit 9550dad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions google/cloud/storage/_signing.py
Expand Up @@ -82,7 +82,7 @@ def get_signed_query_params_v2(credentials, expiration, string_to_sign):
service_account_name = credentials.signer_email
return {
"GoogleAccessId": service_account_name,
"Expires": str(expiration),
"Expires": expiration,
"Signature": signature,
}

Expand Down Expand Up @@ -384,7 +384,7 @@ def generate_signed_url_v2(
signature = _sign_message(string_to_sign, access_token, service_account_email)
signed_query_params = {
"GoogleAccessId": service_account_email,
"Expires": str(expiration),
"Expires": expiration_stamp,
"Signature": signature,
}
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test__signing.py
Expand Up @@ -252,7 +252,7 @@ def test_it(self):

expected = {
"GoogleAccessId": account_name,
"Expires": str(expiration),
"Expires": expiration,
"Signature": base64.b64encode(sig_bytes),
}
self.assertEqual(result, expected)
Expand Down

0 comments on commit 9550dad

Please sign in to comment.