aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2016-03-02 22:10:36 +0100
committerThomas Lenz <thomas.lenz@egiz.gv.at>2016-03-02 22:10:36 +0100
commitda937437e46e06365072820aa555d4cb3f9f9110 (patch)
tree3c9f062ab6f8c87abc063db44d8828a4065329ba /id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv
parent48fd33725c53136fe505067b93390b39e19c41b7 (diff)
downloadmoa-id-spss-da937437e46e06365072820aa555d4cb3f9f9110.tar.gz
moa-id-spss-da937437e46e06365072820aa555d4cb3f9f9110.tar.bz2
moa-id-spss-da937437e46e06365072820aa555d4cb3f9f9110.zip
next parts of new federated authentication implementation
Diffstat (limited to 'id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv')
-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()});
}