summaryrefslogtreecommitdiff
path: root/eaaf_modules/eaaf_module_pvp2_idp/src/main
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2018-07-13 15:49:38 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2018-07-13 15:49:38 +0200
commitaee52550868c56de7f7063e4ca153b031dedecb0 (patch)
treeb196a8b154d1a9ac3db477e96943d53fe03f0eb6 /eaaf_modules/eaaf_module_pvp2_idp/src/main
parent2483ece512a5cbf702da22f979073b24c06a0193 (diff)
downloadEAAF-Components-aee52550868c56de7f7063e4ca153b031dedecb0.tar.gz
EAAF-Components-aee52550868c56de7f7063e4ca153b031dedecb0.tar.bz2
EAAF-Components-aee52550868c56de7f7063e4ca153b031dedecb0.zip
some updates and bugfixes
Diffstat (limited to 'eaaf_modules/eaaf_module_pvp2_idp/src/main')
-rw-r--r--eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/AuthenticationAction.java16
-rw-r--r--eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/PVP2AssertionBuilder.java10
2 files changed, 13 insertions, 13 deletions
diff --git a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/AuthenticationAction.java b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/AuthenticationAction.java
index 32c2cce7..b6e00709 100644
--- a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/AuthenticationAction.java
+++ b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/AuthenticationAction.java
@@ -139,17 +139,17 @@ public class AuthenticationAction implements IAction {
sloInformation.setProtocolType(req.requestedModule());
sloInformation.setSpEntityID(req.getServiceProviderConfiguration().getUniqueIdentifier());
return sloInformation;
-
- } catch (MessageEncodingException e) {
- log.error("Message Encoding exception", e);
- throw new ResponderErrorException("pvp2.01", null, e);
-
- } catch (SecurityException e) {
- log.error("Security exception", e);
+
+ } catch (MessageEncodingException | SecurityException e) {
+ log.warn("Message Encoding exception", e);
throw new ResponderErrorException("pvp2.01", null, e);
} catch (EAAFException e) {
- log.error("Response generation error", e);
+ log.info("Response generation error: Msg: ", e.getMessage());
+ throw new ResponderErrorException(e.getErrorId(), e.getParams(), e);
+
+ } catch (Exception e) {
+ log.warn("Response generation error", e);
throw new ResponderErrorException("pvp2.01", null, e);
}
diff --git a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/PVP2AssertionBuilder.java b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/PVP2AssertionBuilder.java
index 5ef112dd..d049aeb3 100644
--- a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/PVP2AssertionBuilder.java
+++ b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/builder/PVP2AssertionBuilder.java
@@ -156,7 +156,8 @@ public class PVP2AssertionBuilder implements PVPConstants {
//get matching mode from authn. request
String loaMatchingMode = EAAFConstants.EIDAS_LOA_MATCHING_MINIMUM;
- if (StringUtils.isNotEmpty(reqAuthnContext.getComparison().toString()))
+ if (reqAuthnContext.getComparison() != null &&
+ StringUtils.isNotEmpty(reqAuthnContext.getComparison().toString()))
loaMatchingMode = reqAuthnContext.getComparison().toString();
//get requested LoAs
@@ -172,7 +173,7 @@ public class PVP2AssertionBuilder implements PVPConstants {
if (!qaa_uri.trim().startsWith(EAAFConstants.EIDAS_LOA_PREFIX)) {
if (loaLevelMapper != null) {
- log.debug("Find no eIDAS LoA. Start mapping process ... " );
+ log.debug("Find no eIDAS LoA in AuthnReq. Start mapping process ... " );
eIDASLoaFromRequest.add(loaLevelMapper.mapToeIDASLoA(qaa_uri.trim()));
} else
@@ -356,14 +357,13 @@ public class PVP2AssertionBuilder implements PVPConstants {
SubjectConfirmationData subjectConfirmationData = SAML2Utils
.createSAMLObject(SubjectConfirmationData.class);
subjectConfirmationData.setInResponseTo(authnRequest.getID());
- subjectConfirmationData.setNotOnOrAfter(new DateTime(authData.getSsoSessionValidTo().getTime()));
-// subjectConfirmationData.setNotBefore(date);
+ subjectConfirmationData.setNotOnOrAfter(new DateTime(authData.getSsoSessionValidTo().getTime()));
//set 'recipient' attribute in subjectConformationData
subjectConfirmationData.setRecipient(assertionConsumerService.getLocation());
//set IP address of the user machine as 'Address' attribute in subjectConformationData
- String usersIPAddress = pendingReq.getGenericData(
+ String usersIPAddress = pendingReq.getRawData(
RequestImpl.DATAID_REQUESTER_IP_ADDRESS, String.class);
if (StringUtils.isNotEmpty(usersIPAddress))
subjectConfirmationData.setAddress(usersIPAddress);