From 8d5ba9260dcf2ed438056ca237a073b8b7719a5b Mon Sep 17 00:00:00 2001 From: "harald.bratko" Date: Fri, 2 Sep 2005 16:00:19 +0000 Subject: Store serialized saml assertion. git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@489 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../egovernment/moa/id/auth/data/IdentityLink.java | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'id.server/src/at/gv/egovernment/moa/id') diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/data/IdentityLink.java b/id.server/src/at/gv/egovernment/moa/id/auth/data/IdentityLink.java index cc58db916..46a63ef34 100644 --- a/id.server/src/at/gv/egovernment/moa/id/auth/data/IdentityLink.java +++ b/id.server/src/at/gv/egovernment/moa/id/auth/data/IdentityLink.java @@ -1,9 +1,14 @@ package at.gv.egovernment.moa.id.auth.data; +import java.io.IOException; import java.security.PublicKey; +import javax.xml.transform.TransformerException; + import org.w3c.dom.Element; +import at.gv.egovernment.moa.util.DOMUtils; + /** * Data contained in an identity link issued by BMI, relevant to the MOA ID component. @@ -37,6 +42,10 @@ public class IdentityLink { * the original saml:Assertion-Element */ private Element samlAssertion; + /** + * the serializes saml:Assertion + */ + private String serializedSamlAssertion; /** * Element /saml:Assertion/saml:AttributeStatement/saml:Subject/saml:SubjectConfirmation/saml:SubjectConfirmationData/pr:Person */ @@ -150,13 +159,22 @@ public class IdentityLink { public Element getSamlAssertion() { return samlAssertion; } + + /** + * Returns the samlAssertion. + * @return Element + */ + public String getSerializedSamlAssertion() { + return serializedSamlAssertion; + } /** - * Sets the samlAssertion. + * Sets the samlAssertion and the serializedSamlAssertion. * @param samlAssertion The samlAssertion to set */ - public void setSamlAssertion(Element samlAssertion) { + public void setSamlAssertion(Element samlAssertion) throws TransformerException, IOException { this.samlAssertion = samlAssertion; + this.serializedSamlAssertion = DOMUtils.serializeNode(samlAssertion); } /** -- cgit v1.2.3