aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2013-09-09 15:22:52 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2013-09-09 15:22:52 +0200
commitdfd1a56545a4099ae1a38fb51d62058b0e252135 (patch)
tree4f1da27cd82d8480d39a4dc0d20570050efe18c7 /id/server/idserverlib
parent00c5eb776e18c64e8ff31b65bd2e3f73f8c46131 (diff)
downloadmoa-id-spss-1.9.95-SNAPSHOT.tar.gz
moa-id-spss-1.9.95-SNAPSHOT.tar.bz2
moa-id-spss-1.9.95-SNAPSHOT.zip
MOA-ID 1.9.951.9.95-SNAPSHOT
--change BKU selection templates and SendAssertion Templates to responsive design. Therefore, OA parameter "useIframe" is not required anymore.
Diffstat (limited to 'id/server/idserverlib')
-rw-r--r--id/server/idserverlib/pom.xml22
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/LoginFormBuilder.java3
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SendAssertionFormBuilder.java3
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java1
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/ArtifactBinding.java3
-rw-r--r--id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html269
-rw-r--r--id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html56
-rw-r--r--id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormIFrame.html44
8 files changed, 290 insertions, 111 deletions
diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml
index 69e1c8c18..37663c08b 100644
--- a/id/server/idserverlib/pom.xml
+++ b/id/server/idserverlib/pom.xml
@@ -9,7 +9,7 @@
<groupId>MOA.id.server</groupId>
<artifactId>moa-id-lib</artifactId>
<packaging>jar</packaging>
- <version>1.9.90-SNAPSHOT</version>
+ <version>1.9.95-SNAPSHOT</version>
<name>MOA ID API</name>
<properties>
@@ -17,6 +17,16 @@
</properties>
<dependencies>
+ <dependency>
+ <groupId>MOA.id</groupId>
+ <artifactId>stork-saml-engine</artifactId>
+ <version>1.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>MOA.id.server</groupId>
+ <artifactId>moa-id-commons</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>MOA</groupId>
<artifactId>moa-common</artifactId>
@@ -147,16 +157,6 @@
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
- <dependency>
- <groupId>MOA.id</groupId>
- <artifactId>stork-saml-engine</artifactId>
- <version>1.5.2</version>
- </dependency>
- <dependency>
- <groupId>MOA.id.server</groupId>
- <artifactId>moa-id-commons</artifactId>
- <version>1.5.2</version>
- </dependency>
</dependencies>
<build>
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/LoginFormBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/LoginFormBuilder.java
index a80fcfa25..ee5afa5dc 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/LoginFormBuilder.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/LoginFormBuilder.java
@@ -20,7 +20,8 @@ public class LoginFormBuilder {
private static final String HTMLTEMPLATESDIR = "htmlTemplates/";
private static final String HTMLTEMPLATEFULL = "loginFormFull.html";
- private static final String HTMLTEMPLATEIFRAME = "loginFormIFrame.html";
+ private static final String HTMLTEMPLATEIFRAME = "loginFormFull.html";
+ //private static final String HTMLTEMPLATEIFRAME = "loginFormIFrame.html";
private static String AUTH_URL = "#AUTH_URL#";
private static String MODUL = "#MODUL#";
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SendAssertionFormBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SendAssertionFormBuilder.java
index 956593237..59cbbe25e 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SendAssertionFormBuilder.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SendAssertionFormBuilder.java
@@ -20,7 +20,8 @@ public class SendAssertionFormBuilder {
private static final String HTMLTEMPLATESDIR = "htmlTemplates/";
private static final String HTMLTEMPLATEFULL = "sendAssertionFormFull.html";
- private static final String HTMLTEMPLATEIFRAME = "sendAssertionFormIFrame.html";
+ private static final String HTMLTEMPLATEIFRAME = "sendAssertionFormFull.html";
+ //private static final String HTMLTEMPLATEIFRAME = "sendAssertionFormIFrame.html";
private static String URL = "#URL#";
private static String MODUL = "#MODUL#";
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java
index 4ba282dc1..4cd471db0 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java
@@ -38,6 +38,7 @@ public class MonitoringServlet extends AuthServlet {
} else {
resp.setStatus(HttpServletResponse.SC_OK);
+ resp.setContentType("text/html;charset=UTF-8");
Logger.info("Monitoring Servlet finished without errors");
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/ArtifactBinding.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/ArtifactBinding.java
index 1d51d91f1..baea32f28 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/ArtifactBinding.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/ArtifactBinding.java
@@ -73,6 +73,9 @@ public class ArtifactBinding implements IDecoder, IEncoder {
} catch (CredentialsNotAvailableException e) {
e.printStackTrace();
throw new SecurityException(e);
+
+ } catch (Exception e) {
+ throw new SecurityException(e);
}
}
diff --git a/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html b/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html
new file mode 100644
index 000000000..c6b98dc85
--- /dev/null
+++ b/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html
@@ -0,0 +1,269 @@
+<html>
+<head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
+ <meta content="text/css" http-equiv="Content-Style-Type">
+ <link rel="stylesheet" type="text/css" href="#CONTEXTPATH#/css/index.css">
+
+ <script type="text/javascript">
+ function isIE() {
+ return (/MSIE (\d+\.\d+);/.test(navigator.userAgent));
+ }
+
+ function isFullscreen() {
+ try {
+ return ((top.innerWidth == screen.width) && (top.innerHeight == screen.height));
+ } catch (e) {
+ return false;
+ }
+ }
+
+ function isActivexEnabled() {
+ var supported = null;
+ try {
+ supported = !!new ActiveXObject("htmlfile");
+ } catch (e) {
+ supported = false;
+ }
+ return supported;
+ }
+
+ function isMetro() {
+ if (!isIE())
+ return false;
+ return !isActivexEnabled() && isFullscreen();
+ }
+
+ window.onload=function() {
+ document.getElementById("localBKU").style.display="block";
+ return;
+ }
+
+ function bkuOnlineClicked() {
+ if (isMetro())
+ document.getElementById("metroDetected").style.display="block";
+ document.getElementById("localBKU").style.display="block";
+
+/* if (checkMandateSSO())
+ return; */
+
+ setMandateSelection();
+/* setSSOSelection(); */
+
+ var iFrameURL = "#AUTH_URL#" + "?";
+ iFrameURL += "bkuURI=" + "#ONLINE#";
+ iFrameURL += "&useMandate=" + document.getElementById("useMandate").value;
+/* iFrameURL += "&SSO=" + document.getElementById("useSSO").value; */
+ iFrameURL += "&MODUL=" + "#MODUL#";
+ iFrameURL += "&ACTION=" + "#ACTION#";
+ iFrameURL += "&MOASessionID=" + "#SESSIONID#";
+
+ generateIFrame(iFrameURL);
+ }
+
+ function bkuHandyClicked() {
+ document.getElementById("localBKU").style.display="none";
+
+/* if (checkMandateSSO())
+ return; */
+
+ setMandateSelection();
+/* setSSOSelection(); */
+
+ var iFrameURL = "#AUTH_URL#" + "?";
+ iFrameURL += "bkuURI=" + "#HANDY#";
+ iFrameURL += "&useMandate=" + document.getElementById("useMandate").value;
+/* iFrameURL += "&SSO=" + document.getElementById("useSSO").value; */
+ iFrameURL += "&MODUL=" + "#MODUL#";
+ iFrameURL += "&ACTION=" + "#ACTION#";
+ iFrameURL += "&MOASessionID=" + "#SESSIONID#";
+
+ generateIFrame(iFrameURL);
+ }
+
+ function storkClicked() {
+ document.getElementById("localBKU").style.display="none";
+
+/* if (checkMandateSSO())
+ return; */
+
+ setMandateSelection();
+/* setSSOSelection(); */
+
+ var ccc = "AT";
+ var countrySelection = document.getElementById("cccSelection");
+
+ if (countrySelection != null) {
+ ccc = document.getElementById("cccSelection").value;
+ }
+
+ var iFrameURL = "#AUTH_URL#" + "?";
+ iFrameURL += "bkuURI=" + "#ONLINE#";
+ iFrameURL += "&useMandate=" + document.getElementById("useMandate").value;
+ iFrameURL += "&CCC=" + ccc;
+/* iFrameURL += "&SSO=" + document.getElementById("useSSO").value; */
+ iFrameURL += "&MODUL=" + "#MODUL#";
+ iFrameURL += "&ACTION=" + "#ACTION#";
+ iFrameURL += "&MOASessionID=" + "#SESSIONID#";
+
+ generateIFrame(iFrameURL);
+ }
+
+ function generateIFrame(iFrameURL) {
+ var el = document.getElementById("bkulogin");
+ var parent = el.parentNode;
+
+ var iframe = document.createElement("iframe");
+ iframe.setAttribute("src", iFrameURL);
+ iframe.setAttribute("width", "220");
+ iframe.setAttribute("height", "165");
+ iframe.setAttribute("frameborder", "0");
+ iframe.setAttribute("scrolling", "no");
+ iframe.setAttribute("title", "Login");
+
+ parent.replaceChild(iframe, el);
+ }
+
+ function setMandateSelection() {
+ document.getElementById("moaidform").action = "#AUTH_URL#";
+
+ document.getElementById("useMandate").value = "false";
+ var checkbox = document.getElementById("mandateCheckBox");
+ if (checkbox != null) {
+ if (document.getElementById("mandateCheckBox").checked) {
+ document.getElementById("useMandate").value = "true";
+ }
+ }
+ }
+
+/* function setSSOSelection() {
+ document.getElementById("useSSO").value = "false";
+ var checkbox = document.getElementById("SSOCheckBox");
+ if (checkbox != null) {
+ if (document.getElementById("SSOCheckBox").checked) {
+ document.getElementById("useSSO").value = "true";
+ }
+ }
+ } */
+
+/* function checkMandateSSO() {
+ var sso = document.getElementById("SSOCheckBox");
+ var mandate = document.getElementById("mandateCheckBox");
+
+
+ if (sso.checked && mandate.checked) {
+ alert("Anmeldung in Vertretung in kombination mit Single Sign-On wird aktuell noch nicht unterstützt!")
+ mandate.checked = false;
+ sso.checked = false;
+ return true;
+ } else {
+ return false;
+ }
+ } */
+ </script>
+</head>
+
+
+<body>
+
+ <div id="page">
+
+ <div id="page1" class="case selected-case">
+
+ <h2 class="OA_header">Anmeldung an: #OAName#</h2>
+
+ <div id="main">
+ <div id="leftcontent">
+ <h2 id="tabheader" class="dunkel">
+ Login mit Bürgerkarte
+ </h2>
+ <div id="bkulogin" class="hell">
+
+ <div id="mandateLogin" style="margin-top: 10px; margin-bottom: 10px">
+ <table style="margin-left: auto; margin-right: auto;">
+ <tr>
+ <td><input tabindex="1" type="checkbox" name="Mandate"
+ style="vertical-align: middle; margin-right: 5px"
+ id="mandateCheckBox"></td>
+ <td><label for="mandateCheckBox">in Vertretung anmelden</label></td>
+ <td><a href="info_mandates.html" target="_blank"
+ class="infobutton" style="margin-left: 5px" tabindex="5">i</a></td>
+ </tr>
+<!-- <tr>
+ <td><input tabindex="1" type="checkbox" name="SSO"
+ style="vertical-align: middle; margin-right: 5px"
+ id="SSOCheckBox"></td>
+ <td><label for="SSOCheckBox">Single Sign-On</label></td>
+ <td></td>
+ </tr> -->
+ </table>
+ </div>
+
+ <div id="bkukarte" class="hell">
+ <button name="bkuButton" type="button" onClick="bkuOnlineClicked();">KARTE</button>
+ </div>
+
+ <div id="bkuhandy" class="hell">
+ <button name="bkuButton" type="button" onClick="bkuHandyClicked();">HANDY</button>
+ </div>
+
+ <!-- <div id="mandate">
+ <input type="checkbox" name="Mandate" style="vertical-align: middle; margin-right: 5px;" id="mandateCheckBox">
+ <label>in Vertretung anmelden</label>
+ <a href="info_mandates.html" target="_blank" class="infobutton" style="color:#FFF">i</a>
+ </div> -->
+
+ <div id="localBKU" class="hell">
+ <hr>
+ <form method="get" id="moaidform" action="#AUTH_URL#">
+ <input type="hidden" name="bkuURI" value="#LOCAL#">
+ <input type="hidden" name="useMandate" id="useMandate">
+ <input type="hidden" name="SSO" id="useSSO">
+ <input type="hidden" name="CCC" id="ccc">
+ <input type="hidden" name="MODUL" value="#MODUL#">
+ <input type="hidden" name="ACTION" value="#ACTION#">
+ <input type="hidden" name="MOASessionID" value="#SESSIONID#">
+ <input type="submit" size="400" value="lokale BKU" class="sendButton" style="margin-top: 5px;">
+ </form>
+ <p style="margin-bottom: 0px; margin-top: 3px;">
+ <small>Alternativ können Sie eine lokal installierte BKU verwenden.</small>
+ </p>
+ </div>
+
+ <div id="stork" class="hell" align="center">
+ <div id="leftcontent" style="margin-bottom:10px">
+ <h2 id="tabheader" class="dunkel">
+ Home Country Selection
+ </h2>
+ </div>
+ <p>
+ <select name="cccSelection" id="cccSelection" size="1" style="width: 120px; margin-right: 5px;" >
+ <option value="BE">Belgi&euml;/Belgique</option>
+ <option value="EE">Eesti</option>
+ <option value="ES">Espa&ntilde;a</option>
+ <option value="IS">&Iacute;sland</option>
+ <option value="IT">Italia</option>
+ <option value="LI">Liechtenstein</option>
+ <option value="LT">Lithuania</option>
+ <option value="PT">Portugal</option>
+ <option value="SI">Slovenija</option>
+ <option value="FI">Suomi</option>
+ <option value="SE">Sverige</option>
+ </select>
+ <button name="bkuButton" type="button" onClick="storkClicked();">Send</button>
+ <a href="info_stork.html" target="_blank" class="infobutton" style="color:#FFF">i</a>
+ </p>
+ </div>
+ </div>
+
+ <div id="metroDetected" style="display:none" class="hell">
+ <p>
+ Anscheinend verwenden Sie Internet Explorer im Metro-Modus. Wählen Sie bitte "Auf dem Desktop anzeigen" aus den Optionen um die Karten-Anmeldung starten zu können.
+ </p>
+ </div>
+
+ </div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html b/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html
index f4377ace4..f977b1d2e 100644
--- a/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html
+++ b/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html
@@ -3,47 +3,13 @@
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="text/css" http-equiv="Content-Style-Type">
<link rel="stylesheet" type="text/css" href="#CONTEXTPATH#/css/index.css">
- <link type="text/css" rel="stylesheet" href="#CONTEXTPATH#/css/2.0/stammzahl.css">
- <link type="text/css" rel="stylesheet" href="#CONTEXTPATH#/css/2.0/stylesnew.css">
- <link type="text/css" rel="stylesheet" href="#CONTEXTPATH#/css/2.0/stylesinput.css">
-
</head>
<body>
- <div class="pageWidth">
-
- <div id="pagebase">
<div id="page">
- <div id="header" class="header clearfix">
- <h1 class="main_header">MOA-ID 2.0 - Login Preview</h1>
-
-<!-- <ul id="servicenav">
- <li><a href="http://www.dsk.gv.at">Datenschutzkommission<span class="hidden">.</span></a></li>
- <li><a href="http://www.stammzahlenregister.gv.at/site/5109/default.aspx">Stammzahlenregister<span class="hidden">.</span></a></li>
- <li><a href="http://www.dsk.gv.at/DesktopDefault.aspx?alias=dvr">Datenverarbeitungsregister<span class="hidden">.</span></a></li>
- <li><a href="http://www.dsk.gv.at/DesktopDefault.aspx?alias=dsken" lang="en" class="last-item">English<span class="hidden">.</span></a></li>
- </ul> -->
-
- <div id="mainnavjump"></div>
- <p id="homelink"><img src="#CONTEXTPATH#/img/2.0/logo.png" style="width: 250px" alt="EGIZ"></p>
- <ul id="mainnav" class="clearfix">
-<!-- <li><a href="http://www2.egiz.gv.at">Home<span class="hidden">.</span></a></li> -->
-<!-- <li><a href="http://www.stammzahlenregister.gv.at/site/5970/default.aspx">bPK<span class="hidden">.</span></a></li>
- <li><a href="http://www.stammzahlenregister.gv.at/site/5981/default.aspx">Ergänzungsregister<span class="hidden">.</span></a></li>
- <li class="selected"><a href="http://www.stammzahlenregister.gv.at/site/5983/default.aspx" class="current">Vollmachten<span class="hidden"> (gew&auml;hlt)</span><span class="hidden">.</span></a></li>
- <li><a href="http://www.stammzahlenregister.gv.at/site/6001/default.aspx">Veröffentlichungen<span class="hidden">.</span></a></li> -->
- </ul>
-
- </div>
-
-
- <br class="clearAll">
-
- <div id="viewcontrol" class="switch">
<div id="page1" class="case selected-case">
- <div style="margin-left: 0px;">
<!-- <h2 class="OA_header">Anmeldung an: #OAName#</h2> -->
@@ -65,7 +31,7 @@
<input type="hidden" name="value" value="true">
<input type="hidden" name="mod" value="#MODUL#">
<input type="hidden" name="action" value="#ACTION#">
- <input type="hidden" name="identifier" value="#ID#">
+ <input type="hidden" name="identifier" value="#ID#">
<input type="submit" size="400" value="Ja" class="setAssertionButton_full">
</form>
</div>
@@ -74,7 +40,7 @@
<input type="hidden" name="value" value="false">
<input type="hidden" name="mod" value="#MODUL#">
<input type="hidden" name="action" value="#ACTION#">
- <input type="hidden" name="identifier" value="#ID#">
+ <input type="hidden" name="identifier" value="#ID#">
<input type="submit" size="400" value="Nein" class="setAssertionButton_full">
</form>
</div>
@@ -82,24 +48,6 @@
</div>
</div>
</div>
- </div>
- </div>
-
- <br style="clear: both">
- <div id="footer" class="clearfix">
-
-<!-- <h2 class="hidden">&Uuml;ber die Website der Stammzahlenregisterbeh&ouml;rde</h2>
- <ul>
- <li><a href="http://www.stammzahlenregister.gv.at/site/5115/Default.aspx" class="first-item">Impressum<span class="hidden">.</span></a></li>
- <li><a href="http://www.stammzahlenregister.gv.at/site/6004/Default.aspx" lang="en">Sitemap<span class="hidden">.</span></a></li>
-
- <li><a href="http://www.stammzahlenregister.gv.at/site/5122/Default.aspx">Kontakt<span class="hidden">.</span></a></li>
- <li><a href="http://www.stammzahlenregister.gv.at/site/6005/Default.aspx">Hilfe<span class="hidden">.</span></a></li>
- </ul> -->
- </div>
-
-
- </div>
</div>
</div>
</body>
diff --git a/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormIFrame.html b/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormIFrame.html
deleted file mode 100644
index a30bbfa9a..000000000
--- a/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormIFrame.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<html>
-<head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
- <meta content="text/css" http-equiv="Content-Style-Type">
- <link rel="stylesheet" type="text/css" href="#CONTEXTPATH#/css/index.css">
-</head>
-
-
-<body>
- <div id="leftcontent">
- <h2 id="tabheader" class="dunkel">
- Anmeldeinformationen:
-
- </h2>
-
- <div id="selectArea" class="hell">
- <b>Anmeldung an:</b>
- <p>#OAName#</p>
-
-
-<!-- <div class="hell"> -->
- <div id="leftbutton" class="hell">
- <form method="post" id="moaidform_yes" action="#URL#">
- <input type="hidden" name="value" value="true">
- <input type="hidden" name="mod" value="#MODUL#">
- <input type="hidden" name="action" value="#ACTION#">
- <input type="hidden" name="identifier" value="#ID#">
- <input type="submit" size="400" value="Ja" class="setAssertionButton">
- </form>
- </div>
- <div id="rightbutton" class="hell">
- <form method="post" id="moaidform_no" action="#URL#">
- <input type="hidden" name="value" value="false">
- <input type="hidden" name="mod" value="#MODUL#">
- <input type="hidden" name="action" value="#ACTION#">
- <input type="hidden" name="identifier" value="#ID#">
- <input type="submit" size="400" value="Nein" class="setAssertionButton">
- </form>
- </div>
-
- </div>
- </div>
-</body>
-</html>