/*******************************************************************************
* Copyright 2014 Federal Chancellery Austria
* MOA-ID has been developed in a cooperation between BRZ, the Federal
* Chancellery Austria - ICT staff unit, and Graz University of Technology.
*
* Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
* the European Commission - subsequent versions of the EUPL (the "Licence");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
* http://www.osor.eu/eupl/
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*
* This product combines work with different licenses. See the "NOTICE" text
* file for details on the various modules and licenses.
* The "NOTICE" text file is part of the distribution. Any derivative works
* that you distribute must include a readable copy of the "NOTICE" text file.
******************************************************************************/
/*
* Copyright 2003 Federal Chancellery Austria
* MOA-ID has been developed in a cooperation between BRZ, the Federal
* Chancellery Austria - ICT staff unit, and Graz University of Technology.
*
* Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
* the European Commission - subsequent versions of the EUPL (the "Licence");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
* http://www.osor.eu/eupl/
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*
* This product combines work with different licenses. See the "NOTICE" text
* file for details on the various modules and licenses.
* The "NOTICE" text file is part of the distribution. Any derivative works
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package at.gv.egovernment.moa.id.auth.data;
import at.gv.egovernment.moa.id.commons.api.data.ExtendedSAMLAttribute;
/**
* Includes the result of an extended infobox validation.
*
* If validation succeeds, an array of
* {@link at.gv.egovernment.moa.id.commons.api.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.
*
* @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.commons.api.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.commons.api.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.commons.api.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();
}