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
* Provide a way to pass token generation policy
* Added generateTokenResponse methods to allow for handling optout
Old 'generateToken' method was not capable of handling optout responses
when user requested that no tokens should be generated if user had optedout.
The new class TokenGenerateResponse works in similar way as TokenRefreshResponse,
providing a way to check if response is opted out or successful
* Fixed javadoc for PublisherUid2Client
* Added integration test for not generating tokens on optout
* @param tokenGenerateInput represents the input required for <a href="https://unifiedid.com/docs/endpoints/post-token-generate#unencrypted-json-body-parameters">/token/generate</a>
22
22
* @return an IdentityTokens instance
23
23
* @throws Uid2Exception if the response did not contain a "success" status, or the response code was not 200, or there was an error communicating with the provided UID2 Base URL
24
+
* @deprecated Use {@link PublisherUid2Client#generateTokenResponse}
@@ -44,6 +46,33 @@ public IdentityTokens generateToken(TokenGenerateInput tokenGenerateInput) {
44
46
}
45
47
}
46
48
49
+
/**
50
+
* @param tokenGenerateInput represents the input required for <a href="https://unifiedid.com/docs/endpoints/post-token-generate#unencrypted-json-body-parameters">/token/generate</a>
51
+
* @return an TokenGenerateResponse instance, which will contain an IdentityTokens instance, if successful.
52
+
* @throws Uid2Exception if the response did not contain a "success" or "optout" status, or the response code was not 200, or there was an error communicating with the provided UID2 Base URL
thrownewUid2Exception("Error communicating with api endpoint", e);
73
+
}
74
+
}
75
+
47
76
/**
48
77
* @param currentIdentity the current IdentityTokens instance, typically retrieved from a user's session
49
78
* @return the refreshed IdentityTokens instance (with a new advertising token and updated expiry times). Typically, this will be used to replace the current identity in the user's session
* @param encryptedResponse the response body returned by a call to <a href="https://unifiedid.com/docs/endpoints/post-token-refresh">/token/refresh</a>
55
69
* @param currentIdentity the current IdentityTokens instance, typically retrieved from a user's session
0 commit comments