Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update test identities #44

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/test/java/com/uid2/client/PublisherTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void integrationGenerateAndRefresh() {

@Test //this test requires these env vars to be configured: UID2_BASE_URL, UID2_API_KEY, UID2_SECRET_KEY
public void integrationOptOut() {
TokenGenerateResponse tokenGenerateResponse = publisherUid2Client.generateTokenResponse(TokenGenerateInput.fromEmail("optout@email.com"));
TokenGenerateResponse tokenGenerateResponse = publisherUid2Client.generateTokenResponse(TokenGenerateInput.fromEmail("refresh-optout@example.com"));
assertFalse(tokenGenerateResponse.isOptout());
IdentityTokens identity = tokenGenerateResponse.getIdentity();
assertNotNull(identity);
Expand Down Expand Up @@ -435,7 +435,7 @@ public void nullJsonStringThrowsNullException() {

@Test
public void optOutRefreshResponse() {
final String refreshResponseKey = "WL0AYr41Db9m6dCIPtQlTz2kE4NMx3nLmloGHkQPGSQ="; //derived by sending "optout@email.com" in a token generate request
final String refreshResponseKey = "WL0AYr41Db9m6dCIPtQlTz2kE4NMx3nLmloGHkQPGSQ="; //derived by sending "refresh-optout@example.com" in a token generate request
final String encryptedRefreshOptOutResponse = "d9I6qCdlJ6mkWYLyw2iGnCnJ5OocyQDtbbvW6YXAYKpxTXaOePQzPPJIrHnI7Io="; //derived by sending a refresh request using the refresh token from the generate request above

JsonObject json = new Gson().fromJson(expectedDecryptedJsonForTokenGenerateResponse, JsonObject.class);
Expand All @@ -452,7 +452,7 @@ public void optOutRefreshResponse() {

@Test
public void optOutGenerateTokenResponse() {
EnvelopeV2 envelope = createEnvelopeForTokenGenerateRequest(IdentityType.Email, "optout@email.com", null, true);
EnvelopeV2 envelope = createEnvelopeForTokenGenerateRequest(IdentityType.Email, "refresh-optout@example.com", null, true);
final String encryptedOptOutResponse = encrypt("{\"status\":\"optout\"}");
TokenGenerateResponse tokenGenerateResponse = publisherUid2Helper.createTokenGenerateResponse(encryptedOptOutResponse, envelope);
assertTrue(tokenGenerateResponse.isOptout());
Expand Down
Loading