Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this support TCF v2.2? #43

Open
un-smurf opened this issue Dec 22, 2023 · 0 comments
Open

Does this support TCF v2.2? #43

un-smurf opened this issue Dec 22, 2023 · 0 comments

Comments

@un-smurf
Copy link

Does this support TCF v2.2 as every TCF String i try comes back with "Undecodable Base64URL string"
Im generating strings to test from here https://iabgpp.com/# using the default TCF string (CP3MC8AP3MC8APoABABGAfEAAAAAAAAAAAAAAAAAAAAA.QAAA.IAAA) which decodes fine on the website but not using the library. If i use a GPP string it works fine.

my test code is basically a copy of the example on the main page

package com.mycompany.app;

import com.iab.gpp.encoder.GppModel;
import com.iab.gpp.encoder.section.TcfEuV2;
import com.iab.gpp.encoder.section.UspV1;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import com.iab.gpp.encoder.error.DecodingException;
import com.iab.gpp.encoder.error.EncodingException;
import com.iab.gpp.encoder.error.InvalidFieldException;
import com.iab.gpp.encoder.error.LazyDecodingException;

public class App 
{
	public static void main(String[] args )
    {
		String gppString = "CP3MC8AP3MC8APoABAENDgCAAAAAAAAAAIwIAAAAAAAA.QAAA.IAAA";

		GppModel gppModelDecoded = new GppModel(); 

		try {
		  gppModelDecoded = new GppModel(gppString); 
		} catch (Throwable e) {
		  e.printStackTrace();
		}

		TcfEuV2 tcfEuV2Section = (TcfEuV2)gppModelDecoded.getSection(TcfEuV2.NAME);
		Integer tcfEuV2Version = tcfEuV2Section.getVersion();
		String tcfEuV2ConsentLanguage = tcfEuV2Section.getConsentLanguage();
		
        System.out.println( tcfEuV2ConsentLanguage );
    } 
}

and my pom.xml has

  	<dependency>
		<groupId>com.iabgpp</groupId>
		<artifactId>iabgpp-encoder</artifactId>
		<version>3.1.1</version>
	</dependency>

Is it me doing something wrong or a bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant