Skip to content

Commit 304319f

Browse files
committed
Fix bug which set token creation time 1hr earlier
1 parent d4eca84 commit 304319f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

examples/sample_bidstream_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def _usage():
1111
sys.exit(1)
1212

1313

14-
if len(sys.argv) <= 6:
14+
if len(sys.argv) < 6:
1515
_usage()
1616

1717
base_url = sys.argv[1]

uid2_client/encryption.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def _encrypt_token(uid2, identity_scope, master_key, site_key, site_id, now, tok
232232
site_payload[12:16] = int.to_bytes(0, byteorder='big', length=4) # Client Key ID
233233
# User Identity Data
234234
site_payload[16:20] = int.to_bytes(0, byteorder='big', length=4) # Privacy Bits
235-
site_payload[20:28] = int.to_bytes(int((now - dt.timedelta(hours=1)).timestamp()) * 1000, byteorder='big',
235+
site_payload[20:28] = int.to_bytes(int(now.timestamp()) * 1000, byteorder='big',
236236
length=8) # Established
237237
site_payload[28:36] = int.to_bytes(int(now.timestamp()) * 1000, byteorder='big', length=8) # last refresh
238238
site_payload[36:] = bytes(base64.b64decode(uid2))

0 commit comments

Comments
 (0)