From 71d355f1a4185e64ece9c95be20b517f4574f894 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 24 Jul 2019 15:20:33 +0300 Subject: Fix: use integer timestamps --- create-artifact-download-token | 2 +- create-artifact-upload-token | 2 +- create-controller-token | 2 +- create-token | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/create-artifact-download-token b/create-artifact-download-token index 999c99f..66bb6a9 100755 --- a/create-artifact-download-token +++ b/create-artifact-download-token @@ -31,7 +31,7 @@ scopes = 'uapi_blobs_id_get' key_text = open(filename, 'r').read() key = Crypto.PublicKey.RSA.importKey(key_text) -now = time.time() +now = int(time.time()) claims = { 'iss': iss, 'sub': 'subject-uuid', diff --git a/create-artifact-upload-token b/create-artifact-upload-token index e0d186d..0c85fb5 100755 --- a/create-artifact-upload-token +++ b/create-artifact-upload-token @@ -31,7 +31,7 @@ scopes = 'uapi_blobs_id_put' key_text = open(filename, 'r').read() key = Crypto.PublicKey.RSA.importKey(key_text) -now = time.time() +now = int(time.time()) claims = { 'iss': iss, 'sub': 'subject-uuid', diff --git a/create-controller-token b/create-controller-token index bfd0905..8d05933 100755 --- a/create-controller-token +++ b/create-controller-token @@ -31,7 +31,7 @@ scopes = 'update-repo publish' key_text = open(filename, 'r').read() key = Crypto.PublicKey.RSA.importKey(key_text) -now = time.time() +now = int(time.time()) claims = { 'iss': iss, 'sub': 'subject-uuid', diff --git a/create-token b/create-token index e2e9fbb..4e3f38f 100755 --- a/create-token +++ b/create-token @@ -31,7 +31,7 @@ scopes = ' '.join(sys.argv[4].split()) key_text = open(filename, 'r').read() key = Crypto.PublicKey.RSA.importKey(key_text) -now = time.time() +now = int(time.time()) claims = { 'iss': iss, 'sub': 'subject-uuid', -- cgit v1.2.1