From 4cc2fc3e44ff1e643c4a16a132ae90e60c84cf37 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 13 Feb 2014 13:19:31 +0100 Subject: * add additional logging * move bkuURL validation --- .../auth/parser/StartAuthentificationParameterParser.java | 15 +++------------ .../egovernment/moa/id/entrypoints/DispatcherServlet.java | 2 +- 2 files changed, 4 insertions(+), 13 deletions(-) (limited to 'id/server') 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; -- cgit v1.2.3