@adv-ui/boros-tcf
Advanced tools
Comparing version 1.14.0 to 1.15.0
@@ -13,3 +13,3 @@ "use strict"; | ||
*/ | ||
var PACKAGE_NAME = "@adv-ui/boros-tcf"; | ||
var PACKAGE_NAME = typeof "@adv-ui/boros-tcf" !== 'undefined' && "@adv-ui/boros-tcf" || 'boros-tcf'; | ||
/** | ||
@@ -22,3 +22,3 @@ * Boros TCF Version is the current version. | ||
exports.PACKAGE_NAME = PACKAGE_NAME; | ||
var BOROS_TCF_VERSION = 14; | ||
var BOROS_TCF_VERSION = typeof 15 !== 'undefined' && 15 || 1; | ||
/** | ||
@@ -25,0 +25,0 @@ * Boros TCF IAB's registered ID |
@@ -102,3 +102,3 @@ "use strict"; | ||
consents = data.purpose.consents, | ||
specialFeatureOptions = data.specialFeatureOptions; | ||
specialFeatures = data.specialFeatures; | ||
var usedData = { | ||
@@ -110,5 +110,9 @@ policyVersion: policyVersion, | ||
}, | ||
specialFeatureOptions: specialFeatureOptions | ||
specialFeatures: specialFeatures | ||
}; | ||
return JSON.stringify(usedData); | ||
var stringData = JSON.stringify(usedData); | ||
var base64Data = this._window.btoa(stringData); | ||
return base64Data; | ||
}; | ||
@@ -115,0 +119,0 @@ |
@@ -50,5 +50,7 @@ "use strict"; | ||
this._borosTcfCookieStorage.save({ | ||
data: decodedConsent | ||
}); | ||
try { | ||
this._borosTcfCookieStorage.save({ | ||
data: decodedConsent | ||
}); | ||
} catch (ignored) {} | ||
}; | ||
@@ -55,0 +57,0 @@ |
{ | ||
"name": "@adv-ui/boros-tcf", | ||
"version": "1.14.0", | ||
"version": "1.15.0", | ||
"description": "Adevinta GDPR - Transparency and Consent Framework - API", | ||
@@ -73,3 +73,3 @@ "main": "dist", | ||
"dependencies": { | ||
"@iabtcf/core": "1", | ||
"@iabtcf/core": "1.0.1", | ||
"brusc": "1", | ||
@@ -76,0 +76,0 @@ "core-js": "3" |
@@ -25,7 +25,41 @@ ![](/resources/logo/boros_logo.png) | ||
A cookie named "borosTcf" is stored with the user consents stringified data. | ||
The structure of that cookie is: | ||
A cookie named "borosTcf" is stored with the user consents stringified data, encoded in Base64. | ||
Sample `borosTcf` value: `eyJwb2xpY3lWZXJzaW9uIjoyLCJjbXBWZXJzaW9uIjoxLCJwdXJwb3NlIjp7ImNvbnNlbnRzIjp7IjEiOnRydWUsIjIiOnRydWUsIjMiOnRydWUsIjQiOnRydWUsIjUiOnRydWUsIjYiOnRydWUsIjciOnRydWUsIjgiOnRydWUsIjkiOnRydWUsIjEwIjp0cnVlfX0sInNwZWNpYWxGZWF0dXJlcyI6eyIxIjp0cnVlfX0=` | ||
The encoded data in this sample value, and the cookie encoded data structure is: | ||
``` | ||
{policyVersion: 2, cmpVersion: 12, purpose: {consents: {1: true, 2: true, 3: false, ....}}, specialFeatureOptions: {1: true}} | ||
{ | ||
"policyVersion": 2, | ||
"cmpVersion": 1, | ||
"purpose": { | ||
"consents": { | ||
"1": true, | ||
"2": true, | ||
"3": true, | ||
"4": true, | ||
"5": true, | ||
"6": true, | ||
"7": true, | ||
"8": true, | ||
"9": true, | ||
"10": true | ||
} | ||
}, | ||
"specialFeatures": { | ||
"1": true | ||
} | ||
} | ||
``` | ||
To decode the cookie, p.ex.: | ||
``` | ||
// Java | ||
String decoded = new String(Base64.getDecoder().decode(cookieValue)); | ||
// Node | ||
const decoded = Buffer.from(cookieValue, 'base64').toString() | ||
``` | ||
@@ -32,0 +66,0 @@ `npm i @adv-ui/boros-tcf` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
127280
3017
91
+ Added@iabtcf/core@1.0.1(transitive)
- Removed@iabtcf/core@1.5.6(transitive)
Updated@iabtcf/core@1.0.1