Skip to content

Commit f643a1a

Browse files
Merge pull request #13 from IABTechLab/bug-in-examples-and-encrypt
Found a bug in sample and encryption
2 parents 137ddba + 455d416 commit f643a1a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/sample_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ def _usage():
3434
# Not required for DSPs, but for those using UID2 sharing functionality this shows how to encrypt a raw UID2 into
3535
# a new advertising token.
3636
# IdentityScope could be UID2 or EUID
37-
new_ad_token = encrypt(ad_token, IdentityScope.UID2, decrypt_result.uid2)
37+
new_ad_token = encrypt(decrypt_result.uid2, IdentityScope.UID2, keys)
3838
print('New Ad Token =', new_ad_token)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77

88
[project]
99
name = "uid2_client"
10-
version = "2.0.2"
10+
version = "2.0.3"
1111
authors = [
1212
{ name = "UID2 team", email = "[email protected]" }
1313
]

uid2_client/encryption.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def encrypt(uid2, identity_scope, keys, keyset_id=None, **kwargs):
219219
master_key = keys.get_by_keyset_key(keys.get_master_keyset_id(), now)
220220

221221
token_expiry = now + dt.timedelta(days=30) if keys.get_token_expiry_seconds() is None \
222-
else now + dt.timedelta(seconds=keys.get_token_expiry_seconds())
222+
else now + dt.timedelta(seconds=int(keys.get_token_expiry_seconds()))
223223

224224
site_id = keys.get_caller_site_id()
225225
if site_id is None:

0 commit comments

Comments
 (0)