Consent-String-SDK-Java
Consent-String-SDK-Java copied to clipboard
Add support for publisher purposes consent string
The library's readme states that "This library is a Java reference implementation for dealing with consent strings in the IAB EU's GDPR Transparency and Consent Framework." There are two distinct consent string formats outlined in the specification (v.1.1):
- global, vendor consent string (euconsent) as described in https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/Consent%20string%20and%20vendor%20list%20formats%20v1.1%20Final.md#vendor-consent-string-format-
- publisher purposes consent string (pubconsent) as described in https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/Consent%20string%20and%20vendor%20list%20formats%20v1.1%20Final.md#publisher-purposes-consent-string-format-
However, currently the library appears to support only global, vendor consent string (correct me if I'm wrong). Looking from a publisher's perspective it would surely help if the publisher purposes consent string was supported as well. It makes sense since both consent strings have similar formats so there is potential for reusing significant part of codebase between the two implementations.
Roughly, these would be the things to do:
- Refactor existing ConsentStringParser, extracting common logic out so that it can be reused when implementing publisher purposes consent string parser
- Rename existing ConsentStringParser so that it's clear it supports global, vendor consent string
- Implement publisher purposes consent string parser
What do you think?
I think that is a great idea, if you have the time can you write it and submit a pull request?
yep, We need it as well
Code was refactored in version 2.0.0 and it should be clear that current classes only deal with vendor consent. At this point I don't have time to research publisher purposes consent as this is not something our company needs. But pull requests would be welcome :-)
Hi, I've built a support for publisher consent strings according to the specs.
I've intentionally split it from the vendor classes so that they can evolve independently. I've also reused the GDPR constants class.
Not sure if this can be of use? Any suggestions? Recommendations?