diff options
author | Thomas <> | 2025-01-13 17:57:45 +0100 |
---|---|---|
committer | Thomas <> | 2025-01-13 17:57:45 +0100 |
commit | 2eb6db52a72002da14124ebd9fa8b378af9f8bd8 (patch) | |
tree | 0e6812d5581389710be6d1ad13845a7b773ce8e6 /eaaf_modules/eaaf_module_auth_sl20 | |
parent | 5787921644497db646f87d88279ab56d10e09b24 (diff) | |
download | EAAF-Components-2eb6db52a72002da14124ebd9fa8b378af9f8bd8.tar.gz EAAF-Components-2eb6db52a72002da14124ebd9fa8b378af9f8bd8.tar.bz2 EAAF-Components-2eb6db52a72002da14124ebd9fa8b378af9f8bd8.zip |
chore(core): only small API changes
Diffstat (limited to 'eaaf_modules/eaaf_module_auth_sl20')
-rw-r--r-- | eaaf_modules/eaaf_module_auth_sl20/src/test/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/JsonSecurityUtilsSoftwareKeyTest.java | 9 |
1 files changed, 5 insertions, 4 deletions
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); |