diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2013-09-05 09:46:38 +0200 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2013-09-05 09:46:38 +0200 |
commit | e3667b6ccf1ae70a8c93b0af7a5bcf505831b073 (patch) | |
tree | 85f74fd2bcf1745dfc8537db7c5c7d2468b46a75 /id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java | |
parent | cf5cf7c5baa823329d38e764ea53efe8f291d367 (diff) | |
parent | eb33e9afb53314c8ab1e0854c587a808e8605fad (diff) | |
download | moa-id-spss-e3667b6ccf1ae70a8c93b0af7a5bcf505831b073.tar.gz moa-id-spss-e3667b6ccf1ae70a8c93b0af7a5bcf505831b073.tar.bz2 moa-id-spss-e3667b6ccf1ae70a8c93b0af7a5bcf505831b073.zip |
Merge branch 'moa2_0_tlenz' of https://gitlab.iaik.tugraz.at/afitzek/moa-idspss into moa2_0_tlenz
Conflicts:
id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java index fec2d2b35..ee0b4e7e2 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java @@ -32,6 +32,7 @@ import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.data.AuthenticationData; import at.gv.egovernment.moa.id.moduls.IRequest; import at.gv.egovernment.moa.id.storage.AssertionStorage; +import at.gv.egovernment.moa.id.util.IdentityLinkReSigner; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.Base64Utils; import at.gv.egovernment.moa.util.Constants; @@ -193,14 +194,26 @@ public class SAML1AuthenticationServer extends AuthenticationServer { .getAuthBlock() : ""; //set IdentityLink for assortion - String ilAssertion = saml1parameter.isProvideIdentityLink() ? authData.getIdentityLink() - .getSerializedSamlAssertion() - : ""; - if (!saml1parameter.isProvideStammzahl()) { - ilAssertion = StringUtils.replaceAll(ilAssertion, authData.getIdentityLink() - .getIdentificationValue(), ""); + String ilAssertion = ""; + if (saml1parameter.isProvideIdentityLink()) { + if (session.getBusinessService()) { + IdentityLinkReSigner identitylinkresigner = IdentityLinkReSigner.getInstance(); + + Element resignedilAssertion = identitylinkresigner.resignIdentityLink(authData.getIdentityLink() + .getSamlAssertion()); + + ilAssertion = DOMUtils.serializeNode(resignedilAssertion); + + } else { + ilAssertion = authData.getIdentityLink().getSerializedSamlAssertion(); + + if (!saml1parameter.isProvideStammzahl()) + ilAssertion = StringUtils.replaceAll(ilAssertion, authData.getIdentityLink() + .getIdentificationValue(), ""); + + } } - + String samlAssertion; if (session.getUseMandate()) { |