You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A UID2 sharer is a participant that wants to share UID2s or EUIDs with another participant. Raw UID2s must be encrypted into UID2 tokens before sending them to another participant.
47
-
For examples of usage, see [sample_sharing.py](examples/sample_sharing.py) and [sample_auto_refresh.py](examples/sample_auto_refresh.py)
2. If encryption was successful, send the token `encrypted.uid2` to the receiver.
63
-
64
-
Receivers:
65
-
66
-
1. Call the following:
67
-
```
68
-
decrypted = client.decrypt(uid_token)
69
-
```
70
-
2. If decryption was successful, use the token `decrypted.uid2`.
71
-
72
47
## Usage for Publishers
73
48
74
49
1. Create an instance of Uid2PublisherClient
@@ -89,7 +64,7 @@ If you're using standard integration (client and server) (see [UID2 SDK for Java
89
64
90
65
* Send this identity as a JSON string back to the client (to use in the [identity field](https://unifiedid.com/docs/sdks/client-side-identity#initopts-object-void)) using the following:
91
66
92
-
`token_generate_response.get_identity_json_string()` //Note: this method returns `None` if the user has opted out, so be sure to handle that case.
67
+
`token_generate_response.get_identity_json_string()` //Note: this method returns `None` if the user has opted out, so be sure to handle that case.
93
68
94
69
### Server-Only Integration
95
70
@@ -109,7 +84,7 @@ If you're using server-only integration (see [Publisher Integration Guide, Serve
2. Determine if the identity can be refreshed (that is, the refresh token hasn't expired):
111
86
112
-
`if not identity or not identity.is_refreshable(): # we must no longer use this identity (for example, remove this identity from the user's session) `
87
+
`if not identity or not identity.is_refreshable(): # we must no longer use this identity (for example, remove this identity from the user's session) `
113
88
3. Determine if a refresh is needed:
114
89
115
90
`if identity.is_due_for_refresh()):`
@@ -120,6 +95,35 @@ If you're using server-only integration (see [Publisher Integration Guide, Serve
120
95
6. Store `token_refresh_response.get_identity_json_string()` in the user's session. If the user has opted out, this method returns `None`, indicating that the user's identity should be removed from the session. To confirm optout, you can use the `token_refresh_response.is_optout()` function.
121
96
122
97
98
+
99
+
## Usage for Sharers
100
+
101
+
A UID2 sharer is a participant that wants to share UID2s or EUIDs with another participant. Raw UID2s must be encrypted into UID2 tokens before sending them to another participant.
102
+
For examples of usage, see [sample_sharing.py](examples/sample_sharing.py) and [sample_auto_refresh.py](examples/sample_auto_refresh.py)
0 commit comments