From e0a0a77393300541ad23fcb2d58e6424aff602ce Mon Sep 17 00:00:00 2001 From: "peter.danner" Date: Fri, 12 Jan 2007 23:41:44 +0000 Subject: Allow default user in XML-Configuration for Identities of the Proxy git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@776 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../proxy/XMLLoginParameterResolverPlainData.java | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'id.server/src/at/gv') diff --git a/id.server/src/at/gv/egovernment/moa/id/proxy/XMLLoginParameterResolverPlainData.java b/id.server/src/at/gv/egovernment/moa/id/proxy/XMLLoginParameterResolverPlainData.java index 2d39d4a9a..aedafdf85 100644 --- a/id.server/src/at/gv/egovernment/moa/id/proxy/XMLLoginParameterResolverPlainData.java +++ b/id.server/src/at/gv/egovernment/moa/id/proxy/XMLLoginParameterResolverPlainData.java @@ -218,6 +218,30 @@ public class XMLLoginParameterResolverPlainData userFound = true; } } + if(!userFound) //third step: search for default user in user list + { + //third step: search for (w)bPK for the default user entry in user list + Logger.debug("XMLLoginParameterResolverPlainData: search for automatic login data for default user"); + params = (LPRParams)bPKMap.get("default"); + if(params == null) + Logger.debug("XMLLoginParameterResolverPlainData: params for default user not found in file!"); + else + if(params.getEnabled()) + { //if user is enabled: get related parameters + Logger.debug("XMLLoginParameterResolverPlainData: default user found in list; user is enabled"); + Logger.debug("XMLLoginParameterResolverPlainData: using: " + params.toString()); + userid = params.getUN(); + password = params.getPW(); + param1 = params.getParam1(); + param2 = params.getParam2(); + param3 = params.getParam3(); + userFound = true; + } else + { + Logger.info("XMLLoginParameterResolverPlainData: default user found in list; user is NOT enabled"); + } + } + if(!userFound) //if user is not found then throw NotAllowedException exception { //TODO MOA-ID proove this with testcases! -- cgit v1.2.3