aboutsummaryrefslogtreecommitdiff
path: root/connector/src/main/java/at/gv/egiz/eidas/specific/connector/config/ServiceProviderConfiguration.java
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2018-07-20 10:56:04 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2018-07-20 10:56:04 +0200
commit31bc1246bb56fcd8807678e3f7516023bdfaed44 (patch)
tree0c3ed662a5be943a4ceb70d021e1bb7ac9dc1015 /connector/src/main/java/at/gv/egiz/eidas/specific/connector/config/ServiceProviderConfiguration.java
parent2945c875bda2c8236d0b3fd630358fcaca85f4a8 (diff)
downloadNational_eIDAS_Gateway-31bc1246bb56fcd8807678e3f7516023bdfaed44.tar.gz
National_eIDAS_Gateway-31bc1246bb56fcd8807678e3f7516023bdfaed44.tar.bz2
National_eIDAS_Gateway-31bc1246bb56fcd8807678e3f7516023bdfaed44.zip
add SZR client
add different logging backends define errorcodes and error messages update to eIDAS Ref. impl 2.1
Diffstat (limited to 'connector/src/main/java/at/gv/egiz/eidas/specific/connector/config/ServiceProviderConfiguration.java')
-rw-r--r--connector/src/main/java/at/gv/egiz/eidas/specific/connector/config/ServiceProviderConfiguration.java105
1 files changed, 0 insertions, 105 deletions
diff --git a/connector/src/main/java/at/gv/egiz/eidas/specific/connector/config/ServiceProviderConfiguration.java b/connector/src/main/java/at/gv/egiz/eidas/specific/connector/config/ServiceProviderConfiguration.java
deleted file mode 100644
index 3d8a3bdd..00000000
--- a/connector/src/main/java/at/gv/egiz/eidas/specific/connector/config/ServiceProviderConfiguration.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- *******************************************************************************/
-package at.gv.egiz.eidas.specific.connector.config;
-
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.gv.egiz.eaaf.core.api.data.EAAFConstants;
-import at.gv.egiz.eaaf.core.api.idp.IConfiguration;
-import at.gv.egiz.eaaf.core.exceptions.EAAFException;
-import at.gv.egiz.eaaf.core.impl.idp.conf.SPConfigurationImpl;
-import at.gv.egiz.eidas.specific.connector.MSeIDASNodeConstants;
-
-public class ServiceProviderConfiguration extends SPConfigurationImpl {
- private static final long serialVersionUID = 1L;
- private static final Logger log = LoggerFactory.getLogger(ServiceProviderConfiguration.class);
-
- private String minimumLoA = EAAFConstants.EIDAS_QAA_HIGH;
- private String bPKTargetIdentifier;
-
- public ServiceProviderConfiguration(Map<String, String> spConfig, IConfiguration authConfig) {
- super(spConfig, authConfig);
-
- }
-
- @Override
- public boolean hasBaseIdInternalProcessingRestriction() {
- return false;
-
- }
-
- @Override
- public boolean hasBaseIdTransferRestriction() {
- return isConfigurationValue(
- MSeIDASNodeConstants.PROP_CONFIG_SP_POLICY_BASEIDTRANSFER_RESTRICTION,
- true);
-
- }
-
- @Override
- public String getMinimumLevelOfAssurence() {
- return minimumLoA;
-
- }
-
-
- @Override
- public String getAreaSpecificTargetIdentifier() {
- return bPKTargetIdentifier;
- }
-
-
- @Override
- public String getFriendlyName() {
- return getConfigurationValue(
- MSeIDASNodeConstants.PROP_CONFIG_SP_FRIENDLYNAME,
- "NO FRIENDLYNAME SET");
-
- }
-
- /**
- * Set the minimum level of eIDAS authentication for this SP
- * <br>
- * <b>Default:</b> http://eidas.europa.eu/LoA/high or
- *
- * @param minimumLoA eIDAS LoA URI
- */
-
- public void setMinimumLoA(String minimumLoA) {
- this.minimumLoA = minimumLoA;
- }
-
-
- /**
- * Set the bPK Target for this service provider
- *
- * @param bPKTargetIdentifier
- * @throws EAAFException If the bPKTargetIdentifier is NOT ALLOWED for this service provider
- */
- public void setbPKTargetIdentifier(String bPKTargetIdentifier) throws EAAFException {
- String allowedTargetIdentifierRegExPattern = getConfigurationValue(
- MSeIDASNodeConstants.PROP_CONFIG_SP_POLICY_ALLOWED_TARGETS,
- MSeIDASNodeConstants.POLICY_DEFAULT_ALLOWED_TARGETS);
- log.trace("Use bPK-target regex pattern: " + allowedTargetIdentifierRegExPattern);
-
- Pattern p = Pattern.compile(allowedTargetIdentifierRegExPattern);
- Matcher m = p.matcher(bPKTargetIdentifier);
- if (m.matches()) {
- log.debug("Requested bPK-target: " + bPKTargetIdentifier + " matches regex pattern");
- this.bPKTargetIdentifier = bPKTargetIdentifier;
-
- } else {
- log.warn("Requested bPK-target: " + bPKTargetIdentifier + " does NOT match regex pattern.");
- throw new EAAFException("TODO", new Object[] {bPKTargetIdentifier},
- "Requested bPK-target: " + bPKTargetIdentifier + " does NOT match regex pattern.");
-
- }
-
- }
-
-}