Skip to content

Commit c5378b9

Browse files
authored
Merge pull request #12 from IABTechLab/syw-update-guide-urls-to-unifiedid-dot-com
UID2-1109 updated various guides to point to the pages on unifiedid.com and some link cleanup and renamed Client-Side Javascript SDK to UID2 SDK for Javascript
2 parents e2158e6 + 9d15b91 commit c5378b9

7 files changed

Lines changed: 26 additions & 26 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# UID2 Integration Examples
22

3-
The [UID2 framework](https://github.com/UnifiedID2/uid2docs/tree/main) enables publishers to integrate in either of the following ways:
3+
The [UID2 framework](https://unifiedid.com/docs/intro) enables publishers to integrate in either of the following ways:
44

5-
- Via the standard integration workflow, using the [Client-Side Identity JavaScript SDK](https://github.com/UnifiedID2/uid2docs/blob/main/api/v2/sdks/client-side-identity.md) (also known as the UID2 SDK).
5+
- Via the standard integration workflow, using the [UID2 SDK for Javascript](https://unifiedid.com/docs/sdks/client-side-identity) (also known as the UID2 SDK).
66
- Via the server-only (custom) integration workflow, by building a direct integration without using the UID2 SDK.
77

88
If you are a content publisher interested in generating UID2 tokens for the real-time bidding (RTB) bid stream and want to see how you can use the UID2 services and which integration fits your needs best, you can build and run an example application for each integration.
@@ -11,7 +11,7 @@ The following table summarizes both examples and provides links to the example a
1111

1212
| Environment | Documentation | Description | Primary Audience | Integration Guide |
1313
|-------------|----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
14-
| Node.js | [UID2 SDK Integration Example](./publisher/standard/README.md) | Demonstrates how to use the UID2 services with the [UID2 client SDK](https://github.com/UnifiedID2/uid2docs/blob/main/api/v2/sdks/client-side-identity.md) to implement the standard UID2 integration workflow. | Publishers with web assets | [Client SDK Integration Guide](https://unifiedid.com/docs/guides/publisher-client-side) |
14+
| Node.js | [UID2 SDK Integration Example](./publisher/standard/README.md) | Demonstrates how to use the UID2 services with the [UID2 client SDK](https://unifiedid.com/docs/sdks/client-side-identity) to implement the standard UID2 integration workflow. | Publishers with web assets | [Client SDK Integration Guide](https://unifiedid.com/docs/guides/publisher-client-side) |
1515
| Node.js | [Server-Only UID2 Integration Example](https://github.com/UnifiedID2/uid2-examples/tree/main/publisher/server_only) | Demonstrates how to use the UID2 services to implement a custom (server-only) UID2 integration workflow without relying on an SDK for establishing client UID2 identity and retrieving advertising tokens. | App developers and CTV broadcasters | [Server-Only UID2 Integration Guide](https://unifiedid.com/docs/guides/custom-publisher-integration) |
1616
| Java | [Java SDK Integration Example](./publisher/uid2-java-test-site/README.md) | Demonstrates use of the [UID2 Java SDK](https://github.com/IABTechLab/uid2-client-java) for both a server-only UID2 integration, and a standard (client SDK and server SDK) integration. | Publishers with web assets, app developers, CTV broadcasters | [Server-Only](https://unifiedid.com/docs/guides/custom-publisher-integration); [Client SDK](https://unifiedid.com/docs/guides/publisher-client-side) |
1717

publisher/server_only/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Server-Only UID2 Integration Example
22

3-
[This example](https://example-srvonly-integ.uidapi.com/) demonstrates how a content publisher can use the [UID2 services](https://github.com/UnifiedID2/uid2docs/tree/main) to implement the [custom UID2 integration workflow](https://unifiedid.com/docs/guides/custom-publisher-integration).
3+
[This example](https://example-srvonly-integ.uidapi.com/) demonstrates how a content publisher can use the [UID2 services](https://unifiedid.com/docs/intro) to implement the [custom UID2 integration workflow](https://unifiedid.com/docs/guides/custom-publisher-integration).
44

5-
For an example application using the [Client-Side Identity JavaScript SDK](https://github.com/UnifiedID2/uid2docs/blob/main/api/v2/sdks/client-side-identity.md), see [UID2 SDK Integration Example](../standard/README.md).
5+
For an example application using the [UID2 SDK for Javascript](https://unifiedid.com/docs/sdks/client-side-identity), see [UID2 SDK Integration Example](../standard/README.md).
66

77
>NOTE: While the server side of the example application is implemented in JavaScript using node.js, it is not a requirement. You can use any technology of your choice and refer to the example application for illustration of the functionality that needs to be implemented.
88
@@ -24,7 +24,7 @@ The following table lists the environment variables that you must specify to sta
2424

2525
| Parameter | Data Type | Description |
2626
|:---------------------|:----------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
27-
| `UID2_BASE_URL` | string | The base URL of the UID2 service. For example:</br>Testing environment: `https://operator-integ.uidapi.com`<br/>For details, see [Environments](https://github.com/UnifiedID2/uid2docs/tree/main/api/v2#environments). |
27+
| `UID2_BASE_URL` | string | The base URL of the UID2 service. For example:</br>Testing environment: `https://operator-integ.uidapi.com`<br/>For details, see [Environments](https://unifiedid.com/docs/getting-started/gs-environments). |
2828
| `UID2_API_KEY` | string | Your UID2 authentication key for the UID2 service specified in `UID2_BASE_URL`. | |
2929
| `UID2_CLIENT_SECRET` | string | Your UID2 client secret for the UID2 service specified in `UID2_BASE_URL`. | |
3030
| `SESSION_KEY` | string | The key to the encryption session data stored in the application session cookie. This can be any arbitrary string. | |
@@ -55,8 +55,8 @@ The following table outlines and annotates the steps you may take to test and ex
5555
| Step | Description | Comments |
5656
|:----:|:------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
5757
| 1 | In your browser, navigate to the application main page at `http://localhost:3000`. | The displayed main (index) page of the example application provides a [login form](views/login.html) for the user to complete the UID2 login process.</br>IMPORTANT: A real-life application must also display a form for the user to express their consent to targeted advertising. |
58-
| 2 | Enter the user email address that you want to use for testing and click **Log In**. | This is a call to the `/login` endpoint ([server.js](server.js)). The login initiated on the server side then calls the [POST /token/generate](https://github.com/UnifiedID2/uid2docs/blob/main/api/v2/endpoints/post-token-generate.md#decrypted-json-response-format) endpoint and processes the received response. |
59-
| | The main page is updated to display links to the two pages with protected content and the established UID2 identity information. | The displayed identity information is the `body` property of the [JSON response payload](https://github.com/UnifiedID2/uid2docs/blob/main/api/v2/endpoints/post-token-generate.md#decrypted-json-response-format) from the successful `POST /token/generate` response. If the response is successful, the returned identity is saved to a session cookie (a real-world application would use a different way to store session data) and the protected index page is rendered. |
58+
| 2 | Enter the user email address that you want to use for testing and click **Log In**. | This is a call to the `/login` endpoint ([server.js](server.js)). The login initiated on the server side then calls the [POST /token/generate](https://unifiedid.com/docs/endpoints/post-token-generate) endpoint and processes the received response. |
59+
| | The main page is updated to display links to the two pages with protected content and the established UID2 identity information. | The displayed identity information is the `body` property of the [JSON response payload](https://unifiedid.com/docs/endpoints/post-token-generate#decrypted-json-response-format) from the successful `POST /token/generate` response. If the response is successful, the returned identity is saved to a session cookie (a real-world application would use a different way to store session data) and the protected index page is rendered. |
6060
| 3 | Click either of the two sample content pages. | When the user requests the index or content pages, the server reads the user session and extracts the current UID2 identity ([server.js](server.js)). The `advertising_token` on the identity can be used for targeted advertising. |
61-
| 4 | Click the **Back to the main page** link. | Note that the identity contains several timestamps that determine when the advertising token becomes invalid (`identity_expires`) and when the server should attempt to refresh it (`refresh_from`). Every time a protected page is requested, the `verifyIdentity` function ([server.js](server.js)) calls [POST /token/refresh](https://github.com/UnifiedID2/uid2docs/blob/main/api/v2/endpoints/post-token-refresh.md) as needed.<br/>The user is automatically logged out in the following cases:<br/>- If the identity expires without being refreshed and refresh attempt fails.<br/>- If the refresh token expires.<br/>- If the refresh attempt indicates that the user has opted out. |
61+
| 4 | Click the **Back to the main page** link. | Note that the identity contains several timestamps that determine when the advertising token becomes invalid (`identity_expires`) and when the server should attempt to refresh it (`refresh_from`). Every time a protected page is requested, the `verifyIdentity` function ([server.js](server.js)) calls [POST /token/refresh](https://unifiedid.com/docs/endpoints/post-token-refresh) as needed.<br/>The user is automatically logged out in the following cases:<br/>- If the identity expires without being refreshed and refresh attempt fails.<br/>- If the refresh token expires.<br/>- If the refresh attempt indicates that the user has opted out. |
6262
| 5 | To exit the application, click **Log Out**. | This calls the `/logout` endpoint on the server ([server.js](server.js)), which clears the UID2 session and the first-party cookie and presents the user with the login form again.<br/> NOTE: The page displays the **Log Out** button as long as the user is logged it. |

publisher/snippets/java/V2APIMigration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ public static void main(String[] args) throws Exception {
2626
}
2727

2828
public static void ExampleTokenGeneration(String apiKey, String secretKey) throws Exception {
29-
// documentation: https://github.com/UnifiedID2/uid2docs/blob/main/api/v2/endpoints/post-token-generate.md
29+
// documentation: https://unifiedid.com/docs/endpoints/post-token-generate
3030
String rawData = "{\"email\": \"username@example.com\"}";
3131
V2Request request = makeV2Request(Instant.now(), rawData.getBytes(StandardCharsets.UTF_8), Base64.getDecoder().decode(secretKey));
3232
final URL endpoint = new URL("https://operator-integ.uidapi.com/v2/token/generate");
3333
sendV2Request(request, endpoint, apiKey, secretKey);
3434
}
3535

3636
public static void ExampleIdentityMap(String apiKey, String secretKey) throws Exception {
37-
// documentation: https://github.com/UnifiedID2/uid2docs/blob/main/api/v2/endpoints/post-identity-map.md
37+
// documentation: https://unifiedid.com/docs/endpoints/post-identity-map
3838
String rawData = "{\"email\": [\"username1@example.com\", \"username2@example.com\", \"username3@example.com\"]}";
3939
V2Request request = makeV2Request(Instant.now(), rawData.getBytes(StandardCharsets.UTF_8), Base64.getDecoder().decode(secretKey));
4040
final URL endpoint = new URL("https://operator-integ.uidapi.com/v2/identity/map");

0 commit comments

Comments
 (0)