diff options
author | rudolf <rudolf@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2003-12-19 09:00:07 +0000 |
---|---|---|
committer | rudolf <rudolf@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2003-12-19 09:00:07 +0000 |
commit | b6e8e0a8f45c10d9a0cd77807db7107430752981 (patch) | |
tree | ff2bf15ff279f07166e472dbc2d29b5dcd013d73 /id.server/src/at/gv/egovernment/moa/id/auth/builder | |
parent | b2e2e48ad320dce63f471481cba305b1c95cd619 (diff) | |
download | moa-id-spss-b6e8e0a8f45c10d9a0cd77807db7107430752981.tar.gz moa-id-spss-b6e8e0a8f45c10d9a0cd77807db7107430752981.tar.bz2 moa-id-spss-b6e8e0a8f45c10d9a0cd77807db7107430752981.zip |
MOA-ID 1.1.1D01
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@81 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id.server/src/at/gv/egovernment/moa/id/auth/builder')
-rw-r--r-- | id.server/src/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureRequestBuilder.java | 2 | ||||
-rw-r--r-- | id.server/src/at/gv/egovernment/moa/id/auth/builder/DataURLBuilder.java | 30 |
2 files changed, 31 insertions, 1 deletions
diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureRequestBuilder.java b/id.server/src/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureRequestBuilder.java index 8693c71a9..f8c287cb6 100644 --- a/id.server/src/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureRequestBuilder.java +++ b/id.server/src/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureRequestBuilder.java @@ -22,6 +22,8 @@ public class CreateXMLSignatureRequestBuilder implements Constants { "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + nl + "<sl11:CreateXMLSignatureRequest xmlns:dsig=''" + DSIG_NS_URI + "'' xmlns:sl10=''" + SL10_NS_URI + "'' xmlns:sl11=''" + SL11_NS_URI + "''>" + nl + " <sl11:KeyboxIdentifier>SecureSignatureKeypair</sl11:KeyboxIdentifier>" + nl + + //TODO RS Lsg Switch SecureSignatureKeypair / CertifiedKeyPair + //" <sl11:KeyboxIdentifier>CertifiedKeypair</sl11:KeyboxIdentifier>" + nl + " <sl11:DataObjectInfo Structure=''detached''>" + nl + " <sl10:DataObject Reference=''''/>" + nl + "{1}" + diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/builder/DataURLBuilder.java b/id.server/src/at/gv/egovernment/moa/id/auth/builder/DataURLBuilder.java index 575149d9e..30cc1df5a 100644 --- a/id.server/src/at/gv/egovernment/moa/id/auth/builder/DataURLBuilder.java +++ b/id.server/src/at/gv/egovernment/moa/id/auth/builder/DataURLBuilder.java @@ -1,6 +1,10 @@ package at.gv.egovernment.moa.id.auth.builder; import at.gv.egovernment.moa.id.auth.servlet.AuthServlet; +import at.gv.egovernment.moa.id.config.ConfigurationException; +import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; +import at.gv.egovernment.moa.id.util.MOAIDMessageProvider; +import at.gv.egovernment.moa.logging.Logger; /** * Builds a DataURL parameter meant for the security layer implementation @@ -29,7 +33,31 @@ public class DataURLBuilder { * @return String */ public String buildDataURL(String authBaseURL, String authServletName, String sessionID) { - String dataURL = authBaseURL + authServletName; + + String individualDataURLPrefix = null; + String dataURL; + try { + //check if an individual prefix is configured + individualDataURLPrefix = AuthConfigurationProvider.getInstance(). + getGenericConfigurationParameter(AuthConfigurationProvider.INDIVIDUAL_DATA_URL_PREFIX); + + if (null != individualDataURLPrefix) { + + //check individualDataURLPrefix + if(!individualDataURLPrefix.startsWith("http")) + throw(new ConfigurationException("config.13", new Object[] { individualDataURLPrefix})); + + //when ok then use it + dataURL = individualDataURLPrefix + authServletName; + } else + dataURL = authBaseURL + authServletName; + + } catch (ConfigurationException e) { + Logger.warn(e); + Logger.warn(MOAIDMessageProvider.getInstance().getMessage("config.12", new Object[] { authBaseURL } )); + dataURL = authBaseURL + authServletName; + } + dataURL = addParameter(dataURL, AuthServlet.PARAM_SESSIONID, sessionID); return dataURL; } |