aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java
index a3bf4af11..c912b4620 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java
@@ -231,14 +231,22 @@ public class StartAuthentificationParameterParser implements MOAIDAuthConstants{
if (MiscUtil.isEmpty(templateURL)) {
List<TemplateType> templateURLList = oaParam.getTemplateURL();
-
+ List<String> defaulTemplateURLList =
+ AuthConfigurationProvider.getInstance().getSLRequestTemplates();
+
if ( templateURLList != null && templateURLList.size() > 0
&& MiscUtil.isNotEmpty(templateURLList.get(0).getURL()) ) {
templateURL = FileUtils.makeAbsoluteURL(
oaParam.getTemplateURL().get(0).getURL(),
AuthConfigurationProvider.getInstance().getRootConfigFileDir());
- Log.info("No SL-Template in request, load SL-Template from OA config (URL: " + templateURL + ")");
-
+ Log.info("No SL-Template in request, load SL-Template from OA configuration (URL: " + templateURL + ")");
+
+ } else if ( (defaulTemplateURLList.size() > 0) && MiscUtil.isNotEmpty(defaulTemplateURLList.get(0))) {
+ templateURL = FileUtils.makeAbsoluteURL(
+ defaulTemplateURLList.get(0),
+ AuthConfigurationProvider.getInstance().getRootConfigFileDir());
+ Log.info("No SL-Template in request, load SL-Template from general configuration (URL: " + templateURL + ")");
+
} else {
Logger.error("NO SL-Tempalte found in OA config");
throw new WrongParametersException("StartAuthentication", PARAM_TEMPLATE, "auth.12");