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 {
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 In case of a Service-Provider loading
* error
*/
@Nullable
ISpConfiguration getServiceProviderConfiguration(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
* @param Response class type
* @return T
or null
if no SP configuration was found
* @throws EaafConfigurationException In case of a Service-Provider loading
* error
*/
@Nullable
T getServiceProviderConfiguration(String spIdentifier, 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 String/String without prefix, but never null
*/
Map getBasicConfigurationWithPrefix(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
*/
String validateIdpUrl(URL authReqUrl) throws EaafException;
}