summaryrefslogtreecommitdiff
path: root/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/opensaml/EaafHttpPostDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/opensaml/EaafHttpPostDecoder.java')
-rw-r--r--eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/opensaml/EaafHttpPostDecoder.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/opensaml/EaafHttpPostDecoder.java b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/opensaml/EaafHttpPostDecoder.java
index 87d897d6..58698d56 100644
--- a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/opensaml/EaafHttpPostDecoder.java
+++ b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/opensaml/EaafHttpPostDecoder.java
@@ -3,8 +3,7 @@ package at.gv.egiz.eaaf.modules.pvp2.impl.opensaml;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
-
-import javax.servlet.http.HttpServletRequest;
+import java.util.Base64;
import org.opensaml.core.xml.XMLObject;
import org.opensaml.messaging.decoder.MessageDecodingException;
@@ -14,9 +13,8 @@ import com.google.common.base.Strings;
import at.gv.egiz.eaaf.modules.pvp2.impl.utils.Saml2Utils;
import at.gv.egiz.eaaf.modules.pvp2.impl.utils.SamlHttpUtils;
+import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
-import net.shibboleth.utilities.java.support.codec.Base64Support;
-import net.shibboleth.utilities.java.support.codec.DecodingException;
/**
* SAML2 Post-Binding decoder with same EAAF specific hardening regarding http
@@ -54,7 +52,7 @@ public class EaafHttpPostDecoder extends HTTPPostDecoder {
try {
log.trace("Base64 decoding SAML message: {}", encodedMessage);
- final byte[] decodedBytes = Base64Support.decode(encodedMessage);
+ final byte[] decodedBytes = Base64.getDecoder().decode(encodedMessage);
try {
log.trace("Decoded SAML message: {}", new String(decodedBytes, "UTF-8"));
@@ -66,7 +64,7 @@ public class EaafHttpPostDecoder extends HTTPPostDecoder {
return new ByteArrayInputStream(decodedBytes);
- } catch (final DecodingException e) {
+ } catch (final IllegalArgumentException e) {
log.error("Unable to Base64 decode SAML message");
throw new MessageDecodingException("Unable to Base64 decode SAML message",e);
}