From ba01e78bf13485ebb4058dd0322c752854f0922b Mon Sep 17 00:00:00 2001 From: "harald.bratko" Date: Wed, 1 Aug 2007 17:20:44 +0000 Subject: Changed for compability mode. git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@892 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../moa/id/auth/data/InfoboxValidationResult.java | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResult.java (limited to 'id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResult.java') diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResult.java b/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResult.java new file mode 100644 index 000000000..0ee2f21d5 --- /dev/null +++ b/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResult.java @@ -0,0 +1,76 @@ +package at.gv.egovernment.moa.id.auth.data; + +import org.w3c.dom.Element; + +/** + * Includes the result of an extended infobox validation. + * + * If validation succeeds, an array of + * {@link at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute ExtendedSAMLAttributes} + * maybe provided. Each of these SAML-Attributes will be either appended to the + * final SAML-Assertion passed to the online application or to the AUTH-Block, + * or to both. + *
+ * If validation fails the implementing class has to provide a short error message. + *
+ * If the corresponding infobox validator runs in the so called compatibility mode + * a pr:Persondata element to be used in the final saml:Assertion + * ({@see #getPersonData()}) + * + * @author Harald Bratko + */ +public interface InfoboxValidationResult { + + /** + * The method returns true if validation succeeds. In that case + * method {@link #getExtendedSamlAttributes()} may provide an array of + * {@link at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute + * ExtendedSAMLAttributes} that should be appended to the final SAML-Assertion or the + * AUTH-Block or to both. + *
+ * The method returns false if validation fails. In that case + * method {@link #getErrorMessage()} has to provide a short error description. + * + * @return True if validation succeeds, + * otherwise false. + */ + public boolean isValid(); + + /** + * Returns an array of {@link at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute + * ExtendedSAMLAttributes} that should be added to the SAML-Assertion + * provided to the online application. + * The SAML-Attributes in that array will be added to the final + * SAML-Assertion, the AUTH-Block, or both, exactly in the order as they are arranged + * in the array this method returns. + * + * @return An array of {@link at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute + * ExtendedSAMLAttributes} that should be added to the SAML-Assertion + * provided to the online application, the AUTH-Block, or both. If no attributes should + * be added this array maybe null or empty. + */ + public ExtendedSAMLAttribute[] getExtendedSamlAttributes(); + + /** + * A short error description that should be displayed by MOA-ID if + * validation of the InfoBoxReadResponse fails. + * + * @return An short error message if validation fails. + */ + public String getErrorMessage(); + + /** + * Returns a <pr:PersonData> element to be used in the final + * <saml:Assertion>. + *
+ * If the corresponding infobox validator runs in the so called compatibility mode + * the method must return a <pr:PersonData> element to be used within + * the final <saml:Assertion> sent to the online application instead of + * the original <pr:PersonData> element derived from the <Identitylink>. + * + * @return A <pr:PersonData> element if the corresponding infobox validator + * runs in the compatibility mode, otherwise null. + */ + public Element getPersonData(); + +} -- cgit v1.2.3