aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-02-13 13:19:31 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-02-13 13:19:31 +0100
commit4cc2fc3e44ff1e643c4a16a132ae90e60c84cf37 (patch)
treea3c883d3540b68fa5279b2c429dff66ac589e956 /id/server/idserverlib/src/main
parent713ca50cbcb276254689088ea558401af018ffcd (diff)
downloadmoa-id-spss-4cc2fc3e44ff1e643c4a16a132ae90e60c84cf37.tar.gz
moa-id-spss-4cc2fc3e44ff1e643c4a16a132ae90e60c84cf37.tar.bz2
moa-id-spss-4cc2fc3e44ff1e643c4a16a132ae90e60c84cf37.zip
* add additional logging
* move bkuURL validation
Diffstat (limited to 'id/server/idserverlib/src/main')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java15
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java2
2 files changed, 4 insertions, 13 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 bcd7cdc78..89cc1d25e 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
@@ -166,7 +166,9 @@ public class StartAuthentificationParameterParser implements MOAIDAuthConstants{
allowedbkus.addAll(AuthConfigurationProvider.getInstance().getDefaultBKUURLs());
if (!ParamValidatorUtils.isValidBKUURI(bkuURL, allowedbkus))
throw new WrongParametersException("StartAuthentication", PARAM_BKU, "auth.12");
-
+
+ moasession.setBkuURL(bkuURL);
+
if (!oaParam.getBusinessService()) {
if (isEmpty(target))
throw new WrongParametersException("StartAuthentication",
@@ -229,17 +231,6 @@ public class StartAuthentificationParameterParser implements MOAIDAuthConstants{
moasession.setSourceID(sourceID);
}
- // BKU URL has not been set yet, even if session already exists
- if (bkuURL == null) {
- if (req.getScheme() != null && req.getScheme().equalsIgnoreCase("https")) {
- bkuURL = DEFAULT_BKU_HTTPS;
- } else {
- bkuURL = DEFAULT_BKU;
- }
- }
- moasession.setBkuURL(bkuURL);
-
-
if (MiscUtil.isEmpty(templateURL)) {
templateURL = oaParam.getTemplateURL().get(0).getURL();
Log.info("No SL-Template in request, load SL-Template from OA config (URL: " + templateURL + ")");
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java
index 6b774261d..b5f0a7557 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java
@@ -491,7 +491,7 @@ public class DispatcherServlet extends AuthServlet{
}
} catch (Throwable e) {
- e.printStackTrace();
+ Logger.info("An authentication error occous: " + e.getMessage());;
// Try handle module specific, if not possible rethrow
if (!info.generateErrorMessage(e, req, resp, protocolRequest)) {
throw e;