aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main
diff options
context:
space:
mode:
authorpdanner <pdanner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-11-16 15:18:03 +0000
committerpdanner <pdanner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-11-16 15:18:03 +0000
commitde1331212b42603ed762ec69c234b32a71fa764d (patch)
treeaee7d1be2da292d6c88b148a035ecd5967fd3c4b /id/server/idserverlib/src/main
parentca6a7b6abe25499e5afc37d179d2400d28a51378 (diff)
downloadmoa-id-spss-de1331212b42603ed762ec69c234b32a71fa764d.tar.gz
moa-id-spss-de1331212b42603ed762ec69c234b32a71fa764d.tar.bz2
moa-id-spss-de1331212b42603ed762ec69c234b32a71fa764d.zip
Refined Eclipse WTP settings; changed standard configuration
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1041 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id/server/idserverlib/src/main')
-rw-r--r--id/server/idserverlib/src/main/java/META-INF/MANIFEST.MF3
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java16
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthConstants.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java1
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/StartAuthenticationServlet.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/VerifyInfoboxParameter.java27
-rw-r--r--id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties1
-rw-r--r--id/server/idserverlib/src/main/resources/resources/templates/ParepMinTemplate.html14
-rw-r--r--id/server/idserverlib/src/main/resources/resources/templates/ParepTemplate.html14
10 files changed, 60 insertions, 22 deletions
diff --git a/id/server/idserverlib/src/main/java/META-INF/MANIFEST.MF b/id/server/idserverlib/src/main/java/META-INF/MANIFEST.MF
deleted file mode 100644
index 5e9495128..000000000
--- a/id/server/idserverlib/src/main/java/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Class-Path:
-
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
index bac66eeab..caeff905b 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
@@ -265,7 +265,8 @@ public class AuthenticationServer implements MOAIDAuthConstants {
* @param oaURL online application URL requested
* @param bkuURL URL of the "B&uuml;rgerkartenumgebung" to be used;
* may be <code>null</code>; in this case, the default location will be used
- * @param templateURL URL providing an HTML template for the HTML form generated
+ * @param templateURL URL providing an HTML template for the HTML form generated
+ * @param scheme determines the protocol used
* @return HTML form
* @throws AuthenticationException
* @see GetIdentityLinkFormBuilder
@@ -277,7 +278,8 @@ public class AuthenticationServer implements MOAIDAuthConstants {
String oaURL,
String templateURL,
String bkuURL,
- String sessionID)
+ String sessionID,
+ String scheme)
throws WrongParametersException, AuthenticationException, ConfigurationException, BuildException {
if (isEmpty(sessionID)) {
@@ -322,7 +324,11 @@ public class AuthenticationServer implements MOAIDAuthConstants {
}
// BKU URL has not been set yet, even if session already exists
if (bkuURL == null) {
- bkuURL = DEFAULT_BKU;
+ if (scheme!=null && scheme.equalsIgnoreCase("https")) {
+ bkuURL = DEFAULT_BKU_HTTPS;
+ } else {
+ bkuURL = DEFAULT_BKU;
+ }
}
session.setBkuURL(bkuURL);
session.setDomainIdentifier(oaParam.getIdentityLinkDomainIdentifier());
@@ -602,6 +608,10 @@ public class AuthenticationServer implements MOAIDAuthConstants {
}
// check for party representation in mandates infobox
if (Constants.INFOBOXIDENTIFIER_MANDATES.equalsIgnoreCase(identifier) && !((infoboxTokenList == null || infoboxTokenList.size() == 0))){
+ //We need app specific parameters
+ if (null==verifyInfoboxParameter.getApplicationSpecificParams()) {
+ throw new ValidateException("validator.66", new Object[] {friendlyName});
+ }
session.setMandateCompatibilityMode(ParepConfiguration.isMandateCompatibilityMode(verifyInfoboxParameter.getApplicationSpecificParams()));
Element mandate = ParepValidator.extractPrimaryToken(infoboxTokenList);
//ParepUtils.serializeElement(mandate, System.out);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthConstants.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthConstants.java
index 4f9235949..72f29ed40 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthConstants.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthConstants.java
@@ -23,6 +23,8 @@ public interface MOAIDAuthConstants {
public static final String PARAM_INPUT_PROCESSOR_SIGN_TEMPLATE = "InputProcessorSignTemplate";
/** default BKU URL */
public static final String DEFAULT_BKU = "http://localhost:3495/http-security-layer-request";
+ /** default BKU URL for https connections*/
+ public static final String DEFAULT_BKU_HTTPS = "https://127.0.0.1:3496/https-security-layer-request";
/** servlet parameter &quot;returnURI&quot; */
public static final String PARAM_RETURN = "returnURI";
/** servlet parameter &quot;Template&quot; */
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java
index 0d0595b69..9a6c4801f 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java
@@ -95,7 +95,6 @@ public class GetIdentityLinkFormBuilder extends Builder {
throws BuildException
{
String htmlForm = htmlTemplate == null ? DEFAULT_HTML_TEMPLATE : htmlTemplate;
-// String bku = bkuURL == null ? DEFAULT_BKU : bkuURL;
htmlForm = replaceTag(htmlForm, BKU_TAG, bkuURL, true, ALL);
htmlForm = replaceTag(htmlForm, XMLREQUEST_TAG, encodeParameter(xmlRequest), true, ALL);
htmlForm = replaceTag(htmlForm, DATAURL_TAG, dataURL, true, ALL);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/StartAuthenticationServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/StartAuthenticationServlet.java
index 9f0cf6606..912b20a0f 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/StartAuthenticationServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/StartAuthenticationServlet.java
@@ -57,7 +57,7 @@ public class StartAuthenticationServlet extends AuthServlet {
resp.addHeader(HEADER_CACHE_CONTROL,HEADER_VALUE_CACHE_CONTROL_IE);
try {
String getIdentityLinkForm =
- AuthenticationServer.getInstance().startAuthentication(authURL, target, oaURL, templateURL, bkuURL, sessionID);
+ AuthenticationServer.getInstance().startAuthentication(authURL, target, oaURL, templateURL, bkuURL, sessionID, req.getScheme());
resp.setContentType("text/html;charset=UTF-8");
PrintWriter out = new PrintWriter(resp.getOutputStream());
out.print(getIdentityLinkForm);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java
index 27955602f..d4398102c 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java
@@ -821,6 +821,8 @@ public class ConfigurationBuilder {
verifyInfoboxParameter.setSchemaLocations(schemaLocations);
} else if (paramName.equals("ApplicationSpecificParameters")) {
verifyInfoboxParameter.setApplicationSpecificParams(paramElem);
+ } else if (paramName.equals("ParepSpecificParameters")) {
+ verifyInfoboxParameter.appendParepSpecificParams(paramElem);
}
}
// use default values for those parameters not yet set by local configuration
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/VerifyInfoboxParameter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/VerifyInfoboxParameter.java
index fbd42f975..b64303ce5 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/VerifyInfoboxParameter.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/VerifyInfoboxParameter.java
@@ -6,9 +6,13 @@ import java.util.List;
import javax.xml.transform.TransformerException;
+import org.apache.xpath.XPathAPI;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
import at.gv.egovernment.moa.id.auth.data.Schema;
+import at.gv.egovernment.moa.util.Constants;
import at.gv.egovernment.moa.util.DOMUtils;
import at.gv.egovernment.moa.util.StringUtils;
@@ -122,6 +126,29 @@ public class VerifyInfoboxParameter {
}
/**
+ * Appends special application specific parameters for party representation.
+ *
+ * @param applicationSpecificParams The application specific parameters for party representation to set.
+ */
+ public void appendParepSpecificParams(Element applicationSpecificParams) {
+ try {
+ if (applicationSpecificParams_==null) {
+ applicationSpecificParams_ = applicationSpecificParams.getOwnerDocument().createElement("ApplicationSpecificParameters");
+ }
+ Element nameSpaceNode = applicationSpecificParams.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns:" + Constants.MOA_ID_CONFIG_PREFIX, Constants.MOA_ID_CONFIG_NS_URI);
+ NodeList nodeList = XPathAPI.selectNodeList(applicationSpecificParams, "*", nameSpaceNode);
+ if (null!=nodeList) {
+ for (int i=0; i<nodeList.getLength(); i++) {
+ applicationSpecificParams_.appendChild((Node) nodeList.item(i));
+ }
+ }
+ } catch (TransformerException e) {
+ //Do nothing
+ }
+ }
+
+ /**
* Returns the friendly name.
*
* @see #friendlyName_
diff --git a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties
index 8e8f9583b..825434b91 100644
--- a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties
+++ b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties
@@ -163,5 +163,6 @@ validator.62=Fehler in der Übermittlung: keine primäre Vollmacht übergeben.
validator.63=Es ist ein Fehler bei der Formulargenerierung für berufliche Parteienvetretung aufgetreten.
validator.64=Fehler beim Austausch von Vollmachtsdaten
validator.65=Es ist ein Fehler bei der Formulargenerierung für berufliche Parteienvetretung aufgetreten - kein Formular zur Anzeige vorhanden.
+validator.66=Überprüfung der {0}-Infobox fehlgeschlagen: berufliche Parteienvetretung ist nicht konfiguriert.
ssl.01=Validierung des SSL-Server-Endzertifikates hat fehlgeschlagen
diff --git a/id/server/idserverlib/src/main/resources/resources/templates/ParepMinTemplate.html b/id/server/idserverlib/src/main/resources/resources/templates/ParepMinTemplate.html
index 61e5adcaa..0ce83ba12 100644
--- a/id/server/idserverlib/src/main/resources/resources/templates/ParepMinTemplate.html
+++ b/id/server/idserverlib/src/main/resources/resources/templates/ParepMinTemplate.html
@@ -7,7 +7,7 @@
</head>
<body>
Berufsm&auml;&szlig;ige Parteienvertretung einer nat&uuml;rlichen/juristischen Person
-<form name="ProcessInputForm" method="post" accept-charset="UTF-8" enctype="application/x-www-form-urlencoded" action="<BKU>">
+<form name="ProcessInputForm" method="post" accept-charset="UTF-8" enctype="application/x-www-form-urlencoded" action="<BKU>">
<table width="80%" border="0">
<tr/>
<tr/>
@@ -42,7 +42,7 @@ Berufsm&auml;&szlig;ige Parteienvertretung einer nat&uuml;rlichen/juristischen P
</tr>
<tr>
<td colspan="3"><br/>
- <em>Vetretene Person:</em></td>
+ <em>Vertretene Person:</em></td>
</tr>
<tr>
<td colspan="3"><input name="physical_" type="radio" physdisabled="" value="true" physselected="" />&nbsp;nat&uuml;rliche Person:&nbsp;</td>
@@ -101,9 +101,9 @@ Berufsm&auml;&szlig;ige Parteienvertretung einer nat&uuml;rlichen/juristischen P
</td>
<td></td>
</tr>
- <tr>
+ <tr>
<td colspan="3">&nbsp;</td>
- </tr>
+ </tr>
<tr>
<td colspan="3"><input name="physical_" type="radio" cbdisabled="" value="false" cbselected=""/ >&nbsp;juristische Person:&nbsp;</td>
</tr>
@@ -124,11 +124,11 @@ Berufsm&auml;&szlig;ige Parteienvertretung einer nat&uuml;rlichen/juristischen P
<td></td>
</tr>
</table>
- <br/><errortext>
- <p><em>Bitte halten Sie Ihre B&uuml;rgerkartenumgebung bereit.</em></p> <p>
+ <br/><errortext>
+ <p><em>Bitte halten Sie Ihre B&uuml;rgerkartenumgebung bereit.</em></p> <p>
<input name="XMLRequest" type="hidden" value="&lt;?xml version='1.0' encoding='UTF-8'?>&lt;NullOperationRequest xmlns='http://www.buergerkarte.at/namespaces/securitylayer/1.2#'/>"/>
<input name="DataURL" type="hidden" value="<DataURL>"/>
- <input type="submit" name="Submit" value=" Weiter "/>
+ <input type="submit" name="Submit" value=" Weiter "/>
<input name="Clear" type="reset" id="Clear" value="Formular zur&uuml;cksetzen"/></p><br/>
</form>
</body>
diff --git a/id/server/idserverlib/src/main/resources/resources/templates/ParepTemplate.html b/id/server/idserverlib/src/main/resources/resources/templates/ParepTemplate.html
index c7b95f598..cd3221b6e 100644
--- a/id/server/idserverlib/src/main/resources/resources/templates/ParepTemplate.html
+++ b/id/server/idserverlib/src/main/resources/resources/templates/ParepTemplate.html
@@ -42,7 +42,7 @@ Bitte beachten Sie
<h2>Berufsm&auml;&szlig;ige Parteienvertretung einer nat&uuml;rlichen/juristischen Person
</h2>
<div class="boundingbox">
-<form name="ProcessInputForm" method="post" accept-charset="UTF-8" enctype="application/x-www-form-urlencoded" action="<BKU>">
+<form name="ProcessInputForm" method="post" accept-charset="UTF-8" enctype="application/x-www-form-urlencoded" action="<BKU>">
<table width="80%" border="0">
<tr/>
<tr/>
@@ -77,7 +77,7 @@ Bitte beachten Sie
</tr>
<tr>
<td colspan="3"><br/>
- <em>Vetretene Person:</em></td>
+ <em>Vertretene Person:</em></td>
</tr>
<tr>
<td colspan="3"><input name="physical_" type="radio" physdisabled="" value="true" physselected="" />&nbsp;nat&uuml;rliche Person:&nbsp;</td>
@@ -136,9 +136,9 @@ Bitte beachten Sie
</td>
<td></td>
</tr>
- <tr>
+ <tr>
<td colspan="3">&nbsp;</td>
- </tr>
+ </tr>
<tr>
<td colspan="3"><input name="physical_" type="radio" cbdisabled="" value="false" cbselected=""/ >&nbsp;juristische Person:&nbsp;</td>
</tr>
@@ -159,11 +159,11 @@ Bitte beachten Sie
<td></td>
</tr>
</table>
- <br/><errortext>
- <p><em>Bitte halten Sie Ihre B&uuml;rgerkartenumgebung bereit.</em></p> <p>
+ <br/><errortext>
+ <p><em>Bitte halten Sie Ihre B&uuml;rgerkartenumgebung bereit.</em></p> <p>
<input name="XMLRequest" type="hidden" value="&lt;?xml version='1.0' encoding='UTF-8'?>&lt;NullOperationRequest xmlns='http://www.buergerkarte.at/namespaces/securitylayer/1.2#'/>"/>
<input name="DataURL" type="hidden" value="<DataURL>"/>
- <input type="submit" name="Submit" value=" Weiter "/>
+ <input type="submit" name="Submit" value=" Weiter "/>
<input name="Clear" type="reset" id="Clear" value="Formular zur&uuml;cksetzen"/></p><br/>
</form>
</div>