summaryrefslogtreecommitdiff
path: root/eaaf_modules/eaaf_module_pvp2_sp/src
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_modules/eaaf_module_pvp2_sp/src')
-rw-r--r--eaaf_modules/eaaf_module_pvp2_sp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/sp/impl/PvpAuthnRequestBuilder.java5
-rw-r--r--eaaf_modules/eaaf_module_pvp2_sp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/sp/impl/utils/AssertionAttributeExtractor.java17
2 files changed, 7 insertions, 15 deletions
diff --git a/eaaf_modules/eaaf_module_pvp2_sp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/sp/impl/PvpAuthnRequestBuilder.java b/eaaf_modules/eaaf_module_pvp2_sp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/sp/impl/PvpAuthnRequestBuilder.java
index bac90451..13a9cc7a 100644
--- a/eaaf_modules/eaaf_module_pvp2_sp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/sp/impl/PvpAuthnRequestBuilder.java
+++ b/eaaf_modules/eaaf_module_pvp2_sp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/sp/impl/PvpAuthnRequestBuilder.java
@@ -23,8 +23,6 @@ import java.security.NoSuchAlgorithmException;
import java.time.Instant;
import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.commons.lang3.StringUtils;
import org.opensaml.messaging.encoder.MessageEncodingException;
import org.opensaml.saml.common.xml.SAMLConstants;
@@ -60,7 +58,8 @@ import at.gv.egiz.eaaf.modules.pvp2.impl.builder.reqattr.EaafRequestExtensionBui
import at.gv.egiz.eaaf.modules.pvp2.impl.utils.Saml2Utils;
import at.gv.egiz.eaaf.modules.pvp2.sp.api.IPvpAuthnRequestBuilderConfiguruation;
import at.gv.egiz.eaaf.modules.pvp2.sp.exception.AuthnRequestBuildException;
-import net.shibboleth.utilities.java.support.security.impl.SecureRandomIdentifierGenerationStrategy;
+import jakarta.servlet.http.HttpServletResponse;
+import net.shibboleth.shared.security.impl.SecureRandomIdentifierGenerationStrategy;
/**
* PVP2 S-Profil Authentication-Request builder-implementation.
diff --git a/eaaf_modules/eaaf_module_pvp2_sp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/sp/impl/utils/AssertionAttributeExtractor.java b/eaaf_modules/eaaf_module_pvp2_sp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/sp/impl/utils/AssertionAttributeExtractor.java
index 4d8c8993..71421aae 100644
--- a/eaaf_modules/eaaf_module_pvp2_sp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/sp/impl/utils/AssertionAttributeExtractor.java
+++ b/eaaf_modules/eaaf_module_pvp2_sp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/sp/impl/utils/AssertionAttributeExtractor.java
@@ -316,13 +316,8 @@ public class AssertionAttributeExtractor {
* @return Date, when the SAML2 assertion was issued, otherwise null
*/
public Instant getAssertionIssuingDate() {
- try {
- return getFullAssertion().getIssueInstant();
+ return getFullAssertion() != null ? getFullAssertion().getIssueInstant() : null;
- } catch (final NullPointerException e) {
- return null;
-
- }
}
/**
@@ -335,13 +330,11 @@ public class AssertionAttributeExtractor {
* @return Date, after this SAML2 assertion is valid, otherwise null
*/
public Date getAssertionNotBefore() {
- try {
- return Date.from(getFullAssertion().getConditions().getNotBefore());
+ return getFullAssertion() != null && getFullAssertion().getConditions() != null
+ && getFullAssertion().getConditions().getNotBefore() != null
+ ? Date.from(getFullAssertion().getConditions().getNotBefore())
+ : null;
- } catch (final NullPointerException e) {
- return null;
-
- }
}
private AuthnStatement getAuthnStatement() throws AssertionAttributeExtractorExeption {