aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java54
1 files changed, 52 insertions, 2 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java
index cb9ac890d..702cd3ce3 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java
@@ -334,7 +334,14 @@ public class PropertyBasedAuthConfigurationProvider extends ConfigurationProvide
* @return a string with a url-reference to the VerifyAuthBlock trust profile ID.
* @throws ConfigurationException is thrown in case of missing {@link AuthComponentGeneral} or in case of missing {@link MOASP}.
*/
- public String getMoaSpAuthBlockTrustProfileID() throws ConfigurationException {
+ public String getMoaSpAuthBlockTrustProfileID(boolean useTestTrustStore) throws ConfigurationException {
+ if (useTestTrustStore)
+ return getMoaSpAuthBlockTestTrustProfileID();
+ else
+ return getMoaSpAuthBlockTrustProfileID();
+ }
+
+ private String getMoaSpAuthBlockTrustProfileID() throws ConfigurationException {
try {
return configuration.getStringValue(
MOAIDConfigurationConstants.GENERAL_AUTH_MOASP_TRUSTPROFILE_AUTHBLOCK_PROD);
@@ -344,7 +351,39 @@ public class PropertyBasedAuthConfigurationProvider extends ConfigurationProvide
return null;
}
}
+
+
+ /* (non-Javadoc)
+ * @see at.gv.egovernment.moa.id.config.auth.AuthConfiguration#getMoaSpAuthBlockTestTrustProfileID()
+ */
+ private String getMoaSpAuthBlockTestTrustProfileID()
+ throws ConfigurationException {
+ try {
+ return configuration.getStringValue(
+ MOAIDConfigurationConstants.GENERAL_AUTH_MOASP_TRUSTPROFILE_AUTHBLOCK_TEST);
+
+ } catch (at.gv.egiz.components.configuration.api.ConfigurationException e) {
+ Logger.warn("Test-AuthBlock validation trustprofile can not be read from configuration.", e);
+ return null;
+ }
+ }
+ /* (non-Javadoc)
+ * @see at.gv.egovernment.moa.id.config.auth.AuthConfiguration#getMoaSpIdentityLinkTestTrustProfileID()
+ */
+ private String getMoaSpIdentityLinkTestTrustProfileID()
+ throws ConfigurationException {
+ try {
+ return configuration.getStringValue(
+ MOAIDConfigurationConstants.GENERAL_AUTH_MOASP_TRUSTPROFILE_IDL_TEST);
+
+ } catch (at.gv.egiz.components.configuration.api.ConfigurationException e) {
+ Logger.warn("Test-IdentityLink validation trustprofile can not be read from configuration.", e);
+ return null;
+ }
+ }
+
+
/**
* Returns a list of strings with references to all verify transform info IDs within the moa-sp part of the authentication component.
*
@@ -446,7 +485,7 @@ public class PropertyBasedAuthConfigurationProvider extends ConfigurationProvide
* @return String with a url-reference to the VerifyIdentityLink trust profile ID
* @throws ConfigurationException is thrown in case of missing {@link AuthComponentGeneral} or in case of missing {@link VerifyIdentityLink}.
*/
- public String getMoaSpIdentityLinkTrustProfileID() throws ConfigurationException {
+ private String getMoaSpIdentityLinkTrustProfileID() throws ConfigurationException {
try {
return configuration.getStringValue(
MOAIDConfigurationConstants.GENERAL_AUTH_MOASP_TRUSTPROFILE_IDL_PROD);
@@ -1060,4 +1099,15 @@ public class PropertyBasedAuthConfigurationProvider extends ConfigurationProvide
return null;
}
+ /* (non-Javadoc)
+ * @see at.gv.egovernment.moa.id.config.auth.AuthConfiguration#getMoaSpIdentityLinkTrustProfileID(boolean)
+ */
+ @Override
+ public String getMoaSpIdentityLinkTrustProfileID(boolean useTestTrustStore)
+ throws ConfigurationException {
+ if (useTestTrustStore)
+ return getMoaSpIdentityLinkTestTrustProfileID();
+ else
+ return getMoaSpIdentityLinkTrustProfileID();
+ }
}