Skip to content

Commit 8da63d0

Browse files
authored
Merge pull request #960 from IABTechLab/gwh-APIDOCS-2505-dsp-remove-v2-info
DSP direct instructions, remove v2 token info
2 parents ca6e4f1 + 94cf0af commit 8da63d0

File tree

1 file changed

+7
-31
lines changed

1 file changed

+7
-31
lines changed

docs/guides/integration-dsp-no-sdk.md

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Link from '@docusaurus/Link';
1313

1414
This document provides instructions for DSPs who want to integrate with UID2 but who are using a programming language not supported by an existing UID2 SDK.
1515

16-
For a list of the existing SDKs, see [SDKs: Summary](../sdks/summary-sdks.md).
16+
For a list of all SDKs, see [SDKs: Summary](../sdks/summary-sdks.md).
1717

1818
## Overview
1919

@@ -60,7 +60,6 @@ When you have current keys, you'll be able to decrypt a UID2 token into a raw UI
6060

6161
You'll need to complete the following steps:
6262

63-
1. [Check the token version](#check-the-token-version).
6463

6564
1. [Decrypt the token](#decrypt-the-token).
6665

@@ -70,17 +69,9 @@ You'll need to complete the following steps:
7069

7170
The UID2 SDK for C# / .NET uses a `DecryptTokenIntoRawUid` function to perform these steps: see [BidstreamClient.cs, line 15](https://github.com/IABTechLab/uid2-client-net/blob/6ac53b106301e431a4aada3cbfbb93f8164ff7be/src/UID2.Client/BidstreamClient.cs#L15).
7271

73-
### Check the Token Version
74-
75-
There are different UID2 token versions in current use, and later processing steps are a little different depending on whether the token version is v2 or a later version.
76-
77-
You can check the token version using the first few bytes of the token.
78-
79-
To review detailed logic, see [UID2Encryption.cs, lines 36-50](https://github.com/IABTechLab/uid2-client-net/blob/6ac53b106301e431a4aada3cbfbb93f8164ff7be/src/UID2.Client/UID2Encryption.cs#L36-L50).
80-
8172
### Decrypt the Token
8273

83-
Use the master key and site key to decrypt the token. For a code example, refer to the `Decrypt` function: see [UID2Encryption.cs, line 29](https://github.com/IABTechLab/uid2-client-net/blob/6ac53b106301e431a4aada3cbfbb93f8164ff7be/src/UID2.Client/UID2Encryption.cs#L29). This function decrypts UID2 tokens into raw UID2s as part of the UID2 SDK for C# / .NET, and includes logic to handle different token versions.
74+
Use the master key and site key to decrypt the token. For a code example, refer to the `Decrypt` function: see [UID2Encryption.cs, line 29](https://github.com/IABTechLab/uid2-client-net/blob/6ac53b106301e431a4aada3cbfbb93f8164ff7be/src/UID2.Client/UID2Encryption.cs#L29). This function decrypts UID2 tokens into raw UID2s as part of the UID2 SDK for C# / .NET.
8475

8576
<!--
8677
### For Tokens Generated on the Client Side: Honor Opt-Out Status
@@ -102,7 +93,7 @@ For more information about client-side UID2 integration, refer to one of these i
10293

10394
### Make Sure Token Lifetime and Expiration Are Valid
10495

105-
A token must be valid and current so that it can be used in the bidstream. You must do two things:
96+
For use in the bidstream, a token must be valid and current. You must do two things:
10697

10798
- Make sure that the token hasn't expired.
10899
- Check that the token lifetime is a valid value.
@@ -116,32 +107,17 @@ To make sure that the token lifetime has a valid value, check these two conditio
116107

117108
For an example of how this is done, review the code for the `DoesTokenHaveValidLifetimeImpl` function: see [UID2Encryption.cs, line 237](https://github.com/IABTechLab/uid2-client-net/blob/6ac53b106301e431a4aada3cbfbb93f8164ff7be/src/UID2.Client/UID2Encryption.cs#L237).
118109

119-
The following sections show how the lifetime for a token is calculated, and the time until token generation for versions later than v2. The calculation depends on the token version:
120-
121-
- [Calculating Token Lifetime: Token v2](#calculating-token-lifetime-token-v2)
122-
- [Calculating Token Lifetime: All Later Versions](#calculating-token-lifetime-all-later-versions)
123-
124-
#### Calculating Token Lifetime: Token v2
125-
126-
For token v2, the calculation to make sure that the token lifetime is valid for bidstream use is as follows:
127-
128-
```
129-
lifetime = token expiry - current time
130-
```
131-
132-
For v2, we use the token expiry minus the current time to calculate the lifetime. This is because v2 doesn't have a **Token Generated** field, which is present in later versions. All token versions have an **Identity Established** field, but this indicates the time that the original token was generated, before any token refreshes, so it can't be used to calculate whether the token is still valid.
133-
134-
#### Calculating Token Lifetime: All Later Versions
110+
#### Calculating Token Lifetime
135111

136-
For all token versions later than v2, the calculation to make sure that the token lifetime is valid for bidstream use is as follows:
112+
The calculation to make sure that the token lifetime is valid for bidstream use is as follows:
137113

138114
```
139115
lifetime = token expiry - token generated
140116
141117
time until token generation = token generated - current time
142118
```
143119

144-
Versions later than v2 have a **Token Generated** field, which is updated if the token is refreshed, so we use this to calculate the token lifetime.
120+
The token includes a **Token Generated** field, which is updated if the token is refreshed, so we use this to calculate the token lifetime.
145121

146122
### For Tokens Generated on the Client Side: Verify the Domain or App Name
147123

@@ -157,6 +133,6 @@ For more information about client-side UID2 integration, refer to one of these i
157133

158134
## Honor User Opt-Out After Token Decryption
159135

160-
After decrypting the token, you must check the resulting raw UID2 against your opt-out records. If it appears on your opt-out records, you must honor the user's opt-out preference, including by not using the UID2 for bidding.
136+
After decrypting the token, you must check the resulting raw UID2 against your opt-out records. If it appears in your opt-out records, you must honor the user's opt-out preference, including by not using the UID2 for bidding.
161137

162138
For more information, refer to [Honor User Opt-Outs](dsp-guide.md#honor-user-opt-outs) in the *DSP Integration Guide*.

0 commit comments

Comments
 (0)