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
Copy file name to clipboardExpand all lines: README.md
+79-16Lines changed: 79 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,4 @@
1
1
2
-
A java implementation of the IAB consent string 1.1 spec.
3
-
4
-
to test run the following command
5
-
6
-
```sh
7
-
# on *nix, Mac OS
8
-
./gradlew test
9
-
# or, on Windows
10
-
.\gradlew.bat test
11
-
```
12
-
=======
13
2
# Transparency and Consent Framework: Consent-String-SDK-Java
14
3
15
4
Encode and decode web-safe base64 consent information with the IAB EU's GDPR Transparency and Consent Framework.
@@ -21,29 +10,103 @@ The IAB specification for the consent string format is available on the [IAB Git
21
10
22
11
**This library supports the version v1.1 of the specification. It can encode and decode consent strings with version bit 1.**
23
12
24
-
####IAB Europe Transparency and Consent Framework
13
+
## IAB Europe Transparency and Consent Framework
25
14
26
15
In November 2017, IAB Europe and a cross-section of the publishing and advertising industry, announced a new Transparency & Consent Framework to help publishers, advertisers and technology companies comply with key elements of GDPR. The Framework will give the publishing and advertising industries a common language with which to communicate consumer consent for the delivery of relevant online advertising and content.
27
16
28
17
Framework Technical specifications available at: https://raw.githubusercontent.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework.
29
18
30
19
31
-
##Consent String SDK (Java)
20
+
# Consent String SDK (Java)
32
21
-[Installation](#installation)
33
22
-[Usage](#usage)
34
-
-[Use cases](#use-cases)
35
-
-[Additional Documentation](#documentation)
23
+
-[Building](#building)
24
+
-[Contributing](#contributing)
25
+
-[Versioning](#versioning)
26
+
27
+
28
+
## Installation
29
+
30
+
Add dependency to you pom.xml
31
+
32
+
```
33
+
<dependency>
34
+
<groupId>com.conversantmedia.gdpr</groupId>
35
+
<artifactId>consent-string-sdk-java</artifactId>
36
+
<version>2.0.0</version>
37
+
</dependency>
38
+
```
36
39
40
+
## Usage
37
41
42
+
### Decoding consent string
43
+
44
+
```
45
+
final VendorConsent vendorConsent = VendorConsentDecoder.fromBase64String(consentString);
46
+
47
+
if (vendorConsent.isVendorAllowed(vendorId) && vendorConsent.isPurposeAllowed(STORAGE_AND_ACCESS) {
48
+
...
49
+
} else {
50
+
...
51
+
}
52
+
53
+
```
38
54
55
+
### Creating vendor consent
56
+
```
57
+
final VendorConsent vendorConsent = new VendorConsentBuilder()
58
+
.withConsentRecordCreatedOn(now)
59
+
.withConsentRecordLastUpdatedOn(now)
60
+
.withCmpID(cmpId)
61
+
.withCmpVersion(cmpVersion)
62
+
.withConsentScreenID(consentScreenID)
63
+
.withConsentLanguage(consentLanguage)
64
+
.withVendorListVersion(vendorListVersion)
65
+
.withAllowedPurposes(allowedPurposes)
66
+
.withMaxVendorId(maxVendorId)
67
+
.withVendorEncodingType(vendorEncodingType)
68
+
.withDefaultConsent(false)
69
+
.withRangeEntries(rangeEntries)
70
+
.build();
71
+
```
72
+
73
+
### Encoding vendor consent to string
74
+
```
75
+
final String base64String = VendorConsentEncoder.toBase64String(vendorConsent);
1.**master** branch is the current branch where active development is taking place and is associated with the latest release
92
+
1. Previous releases are under branches release/x, where x is the major release version, for example release/1. Those branches are used for bug bixes in previous releases
93
+
1. Each release version is associated with a git tag, for example tag v2.0.0
94
+
95
+
### Pull request procedures
96
+
1. Make sure there is a unit test for each added feature. If pull request is for bug fix, create a unit test that would trigger a bug
97
+
1. Make sure **all** tests pass
98
+
1. Update this document if usage is changing
99
+
39
100
101
+
## Versioning
40
102
103
+
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/tags).
41
104
42
105
## About
43
106
44
107
#### About IAB Tech Lab
45
108
46
-
The IAB Technology Laboratory (?Tech Lab?) is a non-profit research and development consortium that produces and provides standards, software, and services to drive growth of an effective and sustainable global digital media ecosystem. Comprised of digital publishers and ad technology firms, as well as marketers, agencies, and other companies with interests in the interactive marketing arena, IAB Tech Lab aims to enable brand and media growth via a transparent, safe, effective supply chain, simpler and more consistent measurement, and better advertising experiences for consumers, with a focus on mobile and ?TV?/digital video channel enablement. The IAB Tech Lab portfolio includes the DigiTrust real-time standardized identity service designed to improve the digital experience for consumers, publishers, advertisers, and third-party platforms. Board members include AppNexus, ExtremeReach, Google, GroupM, Hearst Digital Media, Integral Ad Science, Index Exchange, LinkedIn, MediaMath, Microsoft, Moat, Pandora, PubMatic, Quantcast, Telaria, The Trade Desk, and Yahoo! Japan. Established in 2014, the IAB Tech Lab is headquartered in New York City with an office in San Francisco and representation in Seattle and London.
109
+
The IAB Technology Laboratory (Tech Lab) is a non-profit research and development consortium that produces and provides standards, software, and services to drive growth of an effective and sustainable global digital media ecosystem. Comprised of digital publishers and ad technology firms, as well as marketers, agencies, and other companies with interests in the interactive marketing arena, IAB Tech Lab aims to enable brand and media growth via a transparent, safe, effective supply chain, simpler and more consistent measurement, and better advertising experiences for consumers, with a focus on mobile and ?TV?/digital video channel enablement. The IAB Tech Lab portfolio includes the DigiTrust real-time standardized identity service designed to improve the digital experience for consumers, publishers, advertisers, and third-party platforms. Board members include AppNexus, ExtremeReach, Google, GroupM, Hearst Digital Media, Integral Ad Science, Index Exchange, LinkedIn, MediaMath, Microsoft, Moat, Pandora, PubMatic, Quantcast, Telaria, The Trade Desk, and Yahoo! Japan. Established in 2014, the IAB Tech Lab is headquartered in New York City with an office in San Francisco and representation in Seattle and London.
47
110
48
111
Learn more about IAB Tech Lab here: [https://www.iabtechlab.com/](https://www.iabtechlab.com/)
0 commit comments