From db520df25d4314908705a09b1463c439a36d3446 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 16 Sep 2019 08:27:06 +0200 Subject: add new configuration interface --- .../eaaf/core/api/idp/IConfigurationWithSP.java | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfigurationWithSP.java (limited to 'eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfigurationWithSP.java') diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfigurationWithSP.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfigurationWithSP.java new file mode 100644 index 00000000..ef453808 --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfigurationWithSP.java @@ -0,0 +1,57 @@ +package at.gv.egiz.eaaf.core.api.idp; + +import java.net.URL; +import java.util.Map; + +import javax.annotation.Nullable; + +import at.gv.egiz.eaaf.core.exceptions.EAAFConfigurationException; +import at.gv.egiz.eaaf.core.exceptions.EAAFException; + +public interface IConfigurationWithSP extends IConfiguration { + + public static final String CONFIG_PROPS_AUTH_DEFAULT_COUNTRYCODE = "configuration.auth.default.countrycode"; + + + /** + * Get a configuration entry for a specific Service Provider + * + * @param uniqueID Unique identifier of the Service Provider + * @return {@link ISPConfiguration} or null if no SP configuration was found + * @throws EAAFConfigurationException + */ + @Nullable + public ISPConfiguration getServiceProviderConfiguration(final String uniqueID) throws EAAFConfigurationException; + + + /** + * Get a configuration entry for a specific Service Provider that is decorated by a Object + * + * @param spIdentifier EntityID of a Service Provider + * @param decorator Decorator that should be used to decorate the result. + * This decorator has to be implement or extend the {@link ISPConfiguration} interface + * @return T or null if no SP configuration was found + * @throws EAAFConfigurationException + */ + @Nullable + public T getServiceProviderConfiguration(String spIdentifier, final Class decorator) throws EAAFConfigurationException; + + + /** + * Get a set of configuration values from file based configuration that starts with this prefix + *

+ * Important: The configuration values must be of type String! + * + * @param prefix Prefix of the configuration key + * @return Map without prefix, but never null + */ + public Map getBasicConfigurationWithPrefix(final String prefix); + + /** + * Validate a URL if it it is allowed by configuration. + * + * @param authReqUrl URL for validation + * @return URL of the application context if the authReqUrl was valid, otherwise null + */ + public String validateIDPURL(URL authReqUrl) throws EAAFException; +} -- cgit v1.2.3