From 2eb6db52a72002da14124ebd9fa8b378af9f8bd8 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Mon, 13 Jan 2025 17:57:45 +0100 Subject: chore(core): only small API changes --- .../auth/sl20/utils/JsonSecurityUtilsSoftwareKeyTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'eaaf_modules/eaaf_module_auth_sl20/src') diff --git a/eaaf_modules/eaaf_module_auth_sl20/src/test/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/JsonSecurityUtilsSoftwareKeyTest.java b/eaaf_modules/eaaf_module_auth_sl20/src/test/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/JsonSecurityUtilsSoftwareKeyTest.java index d78bdbd7..50f0fef0 100644 --- a/eaaf_modules/eaaf_module_auth_sl20/src/test/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/JsonSecurityUtilsSoftwareKeyTest.java +++ b/eaaf_modules/eaaf_module_auth_sl20/src/test/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/JsonSecurityUtilsSoftwareKeyTest.java @@ -2,6 +2,7 @@ package at.gv.egiz.eaaf.modules.auth.sl20.utils; import java.security.KeyStore; import java.security.Provider; +import java.util.Base64; import org.apache.commons.lang3.RandomStringUtils; import org.junit.Assert; @@ -9,7 +10,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.util.Base64Utils; import at.gv.egiz.eaaf.core.exceptions.EaafException; import at.gv.egiz.eaaf.core.impl.credential.KeyStoreConfiguration; @@ -36,11 +36,12 @@ public class JsonSecurityUtilsSoftwareKeyTest extends AbstractJsonSecurityUtilsT @Test public void invalidSignatureRandomBase64UrlEncoded() { - String testValue = Base64Utils.encodeToUrlSafeString(RandomStringUtils.randomAlphanumeric(10).getBytes()) + String testValue = Base64.getUrlEncoder().encodeToString(RandomStringUtils.randomAlphanumeric(10) + .getBytes()) + "." - + Base64Utils.encodeToUrlSafeString(RandomStringUtils.randomAlphanumeric(10).getBytes()) + + Base64.getUrlEncoder().encodeToString(RandomStringUtils.randomAlphanumeric(10).getBytes()) + "." - + Base64Utils.encodeToUrlSafeString(RandomStringUtils.randomAlphanumeric(10).getBytes()); + + Base64.getUrlEncoder().encodeToString(RandomStringUtils.randomAlphanumeric(10).getBytes()); try { joseTools.validateSignature(testValue); -- cgit v1.2.3