aboutsummaryrefslogtreecommitdiff
path: root/id.server/src/at/gv
diff options
context:
space:
mode:
Diffstat (limited to 'id.server/src/at/gv')
-rw-r--r--id.server/src/at/gv/egovernment/moa/id/auth/data/IdentityLink.java22
1 files changed, 20 insertions, 2 deletions
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);
}
/**