diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-05-22 16:55:26 +0200 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-05-22 16:55:26 +0200 |
commit | f18b50f5924b12dc7ab751889125784f4ba8a8d6 (patch) | |
tree | dc56bbe88a4490c0a55fa38aa64ee0694e12c391 /id/server/idserverlib/src/main/java | |
parent | f153fc8cc3ddd496cc43b44f6933318f31a3a12c (diff) | |
download | moa-id-spss-f18b50f5924b12dc7ab751889125784f4ba8a8d6.tar.gz moa-id-spss-f18b50f5924b12dc7ab751889125784f4ba8a8d6.tar.bz2 moa-id-spss-f18b50f5924b12dc7ab751889125784f4ba8a8d6.zip |
always store interfederated IDPs for SLO
Diffstat (limited to 'id/server/idserverlib/src/main/java')
2 files changed, 17 insertions, 8 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java index 792b6cdd7..632227d79 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java @@ -175,14 +175,9 @@ public class AuthenticationDataBuilder implements MOAIDAuthConstants { //mark attribute request as used try { - if (idp.isInterfederationSSOStorageAllowed()) { - interfIDP.setAttributesRequested(true); - MOASessionDBUtils.saveOrUpdate(interfIDP); - - } else { - MOASessionDBUtils.delete(interfIDP); - } - + interfIDP.setAttributesRequested(true); + MOASessionDBUtils.saveOrUpdate(interfIDP); + } catch (MOADatabaseException e) { Logger.error("MOASession interfederation information can not stored to database.", e); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/AuthenticationSessionStoreage.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/AuthenticationSessionStoreage.java index 26922a13b..6c2900752 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/AuthenticationSessionStoreage.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/AuthenticationSessionStoreage.java @@ -42,6 +42,9 @@ import at.gv.egovernment.moa.id.commons.db.dao.session.InterfederationSessionSto import at.gv.egovernment.moa.id.commons.db.dao.session.OASessionStore; import at.gv.egovernment.moa.id.commons.db.dao.session.OldSSOSessionIDStore; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; +import at.gv.egovernment.moa.id.config.ConfigurationException; +import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; +import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.data.EncryptedData; import at.gv.egovernment.moa.id.data.SLOInformationInterface; import at.gv.egovernment.moa.id.moduls.IRequest; @@ -704,6 +707,17 @@ public class AuthenticationSessionStoreage { idp = new InterfederationSessionStore(); idp.setCreated(now); idp.setIdpurlprefix(req.getInterfederationResponse().getEntityID()); + + try { + OAAuthParameter oa = AuthConfigurationProvider.getInstance(). + getOnlineApplicationParameter(idp.getIdpurlprefix()); + idp.setStoreSSOInformation(oa.isInterfederationSSOStorageAllowed()); + + } catch (ConfigurationException e) { + Logger.warn("MOASession could not be created."); + throw new MOADatabaseException(e); + + } idp.setMoasession(dbsession); idpList.add(idp); |