aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-modules-federated_authentication
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/modules/moa-id-modules-federated_authentication')
-rw-r--r--id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/tasks/ReceiveAuthnResponseTask.java39
1 files changed, 12 insertions, 27 deletions
diff --git a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/tasks/ReceiveAuthnResponseTask.java b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/tasks/ReceiveAuthnResponseTask.java
index d87109244..a07a87c2b 100644
--- a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/tasks/ReceiveAuthnResponseTask.java
+++ b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/tasks/ReceiveAuthnResponseTask.java
@@ -171,31 +171,10 @@ public class ReceiveAuthnResponseTask extends AbstractAuthServletTask {
PVPTargetConfiguration.DATAID_INTERFEDERATION_NAMEID, extractor.getNameID());
pendingReq.setGenericDataToSession(
PVPTargetConfiguration.DATAID_INTERFEDERATION_QAALEVEL, extractor.getQAALevel());
-
- //build data-container for AttributeQuery
- FederatedAuthenticatenContainer container = new FederatedAuthenticatenContainer();
- container.setIdpEntityID(idpConfig.getPublicURLPrefix());
- container.setUserNameID(extractor.getNameID());
- container.setUserQAALevel(extractor.getQAALevel());
-
- if (idpConfig.isInterfederationSSOStorageAllowed()) {
- //open SSO session and store IDP as federated IDP
- container.setMoaSessionID(moasession.getSessionID());
-
- //store federatedIDP to MOASession
- authenticatedSessionStorage.
- addFederatedSessionInformation(pendingReq,
- idpConfig.getPublicURLPrefix(), extractor);
-
- }
-
- //store container into transaction storage
- transactionStorage.put(container.getId(), container);
-
- //store container ID to pending-request
- pendingReq.setGenericDataToSession(
- PVPTargetConfiguration.DATAID_INTERFEDERATION_ATTRQUERYCONTAINERID,
- container.getId());
+
+ authenticatedSessionStorage.
+ addFederatedSessionInformation(pendingReq,
+ idpConfig.getPublicURLPrefix(), extractor);
} else {
//SP is real Service-Provider --> check attributes in response
@@ -204,12 +183,18 @@ public class ReceiveAuthnResponseTask extends AbstractAuthServletTask {
//get authenticationData and store it into MOASession
getAuthDataFromInterfederation(extractor, pendingReq.getOnlineApplicationConfiguration(),
idpConfig);
+
+ //store federatedIDP to MOASession
+ if (idpConfig.isInterfederationSSOStorageAllowed())
+ authenticatedSessionStorage.
+ addFederatedSessionInformation(pendingReq,
+ idpConfig.getPublicURLPrefix(), extractor);
//update MOASession
authenticatedSessionStorage.storeSession(moasession);
}
-
+
//store valid assertion into pending-request
pendingReq.setGenericDataToSession(RequestImpl.DATAID_INTERFEDERATIOIDP_RESPONSE, processedMsg);
@@ -268,7 +253,7 @@ public class ReceiveAuthnResponseTask extends AbstractAuthServletTask {
String endpoint = idpConfig.getIDPAttributQueryServiceURL();
if (MiscUtil.isEmpty(endpoint)) {
Logger.error("No AttributeQueryURL for interfederationIDP " + idpConfig.getPublicURLPrefix());
- throw new ConfigurationException("No AttributeQueryURL for interfederationIDP " + idpConfig.getPublicURLPrefix(), null);
+ throw new ConfigurationException("config.26", new Object[]{idpConfig.getPublicURLPrefix()});
}