Consent-String-SDK-Java icon indicating copy to clipboard operation
Consent-String-SDK-Java copied to clipboard

Add support for publisher purposes consent string

Open turu opened this issue 6 years ago • 4 comments

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):

  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-
  2. 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:

  1. Refactor existing ConsentStringParser, extracting common logic out so that it can be reused when implementing publisher purposes consent string parser
  2. Rename existing ConsentStringParser so that it's clear it supports global, vendor consent string
  3. Implement publisher purposes consent string parser

What do you think?

turu avatar May 10 '18 12:05 turu

I think that is a great idea, if you have the time can you write it and submit a pull request?

chrispaterson avatar May 14 '18 16:05 chrispaterson

yep, We need it as well

maxgmer avatar May 31 '18 08:05 maxgmer

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 :-)

lanusau avatar Jun 07 '18 21:06 lanusau

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?

jovanovicivan avatar Jul 07 '19 09:07 jovanovicivan