diff options
author | rudolf <rudolf@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2003-10-24 08:18:40 +0000 |
---|---|---|
committer | rudolf <rudolf@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2003-10-24 08:18:40 +0000 |
commit | 59f78a67d7357fd31de68fc2b623f95b3d654ebc (patch) | |
tree | 9cd5d6ca30ca8a8559a99c4de8935b0947cff76b /id.oa/html | |
parent | 850123b3a6832c69e282b495058308fce7691554 (diff) | |
download | moa-id-spss-59f78a67d7357fd31de68fc2b623f95b3d654ebc.tar.gz moa-id-spss-59f78a67d7357fd31de68fc2b623f95b3d654ebc.tar.bz2 moa-id-spss-59f78a67d7357fd31de68fc2b623f95b3d654ebc.zip |
MOA-ID version 1.1 (initial)
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@18 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id.oa/html')
-rw-r--r-- | id.oa/html/AuthTemplate.jsp | 30 | ||||
-rw-r--r-- | id.oa/html/BKUSelectionTemplate.jsp | 14 | ||||
-rw-r--r-- | id.oa/html/auth.jsp | 48 | ||||
-rw-r--r-- | id.oa/html/chooseBKU.jsp | 19 | ||||
-rw-r--r-- | id.oa/html/form.jsp | 20 | ||||
-rw-r--r-- | id.oa/html/getBKUSelectTag.jsp | 6 | ||||
-rw-r--r-- | id.oa/html/index.jsp | 56 | ||||
-rw-r--r-- | id.oa/html/stateful_login.jsp | 29 |
8 files changed, 222 insertions, 0 deletions
diff --git a/id.oa/html/AuthTemplate.jsp b/id.oa/html/AuthTemplate.jsp new file mode 100644 index 000000000..1fa0d1ef8 --- /dev/null +++ b/id.oa/html/AuthTemplate.jsp @@ -0,0 +1,30 @@ +<html>
+<head>
+<title>MOA ID Auth Sample Login - customized</title>
+</head>
+<body>
+<h1>MOA ID Auth Sample Login - customized</h1>
+<form name="CustomizedForm"
+ action="<BKU>"
+ method="post">
+ <input type="hidden"
+ name="XMLRequest"
+ value="<XMLRequest>"/>
+ <input type="hidden"
+ name="DataURL"
+ value="<DataURL>"/>
+ <input type="submit" value="Bürgerkarte lesen"/>
+</form>
+<form name="CustomizedInfoForm"
+ action="<BKU>"
+ method="post">
+ <input type="hidden"
+ name="XMLRequest"
+ value="<CertInfoXMLRequest>"/>
+ <input type="hidden"
+ name="DataURL"
+ value="<CertInfoDataURL>"/>
+ Hier finden Sie weitere Informationen zur Überprüfung der Zertifikate.
+ <input type="submit" value="Weitere Info"/>
+</form></body>
+</html>
\ No newline at end of file diff --git a/id.oa/html/BKUSelectionTemplate.jsp b/id.oa/html/BKUSelectionTemplate.jsp new file mode 100644 index 000000000..82c8518e9 --- /dev/null +++ b/id.oa/html/BKUSelectionTemplate.jsp @@ -0,0 +1,14 @@ +<html>
+<head>
+<title>BKU Auswahl - customized</title>
+</head>
+<body>
+<h1><font color="green">BKU Auswahl - customized</font></h1>
+<p>
+<form method="post" action="<StartAuth>">
+<BKUSelect>
+<input type="submit" value="Auswählen"/>
+</form>
+</p>
+</body>
+</html>
\ No newline at end of file diff --git a/id.oa/html/auth.jsp b/id.oa/html/auth.jsp new file mode 100644 index 000000000..0b563a83e --- /dev/null +++ b/id.oa/html/auth.jsp @@ -0,0 +1,48 @@ +<html>
+<head>
+<title>MOA ID Auth Sample Login</title>
+</head>
+<body>
+<% /** assumes moa-id-auth and oa in the same servlet container,
+ and moa-id-proxy on a different fixed location */
+ String authUrlPath =
+ request.getScheme() + "://"
+ + request.getServerName() + ":" + request.getServerPort()
+ + "/moa-id-auth/";
+ String proxyUrlPath = "http://10.16.126.28:9080/moa-id-proxy/";
+ String oaUrlPath =
+ request.getScheme() + "://"
+ + request.getServerName() + ":" + request.getServerPort()
+ + "/oa/";
+ String params =
+ "Target=gb&" +
+ "OA=" + proxyUrlPath + "index.jsp";
+ String urlStartAuth =
+ authUrlPath +
+ "StartAuthentication?" +
+ params;
+ String templateParam =
+ "&Template=" + oaUrlPath + "AuthTemplate.jsp";
+ String urlStartAuthCustom =
+ urlStartAuth +
+ templateParam;
+ String urlSelectBKU =
+ authUrlPath +
+ "SelectBKU?" +
+ params;
+ String urlSelectBKUCustom =
+ urlSelectBKU +
+ templateParam +
+ "&BKUSelectionTemplate=" + oaUrlPath + "BKUSelectionTemplate.jsp";
+%>
+<a href="<%=urlStartAuth%>">Log in to sample application</a>
+<br>
+<a href="<%=urlStartAuthCustom%>">Log in to sample application using custom form</a>
+<br>
+<a href="<%=urlSelectBKU%>">Choose BKU (HTMLComplete or HTMLSelect) and log in</a>
+<br>
+<a href="<%=urlSelectBKUCustom%>">Choose BKU (HTMLSelect) using custom form and log in</a>
+<br>
+<a href="<%=authUrlPath+"StartAuthentication"%>">Wrong parameters example</a>
+</body>
+</html>
\ No newline at end of file diff --git a/id.oa/html/chooseBKU.jsp b/id.oa/html/chooseBKU.jsp new file mode 100644 index 000000000..0135b6fdf --- /dev/null +++ b/id.oa/html/chooseBKU.jsp @@ -0,0 +1,19 @@ +<html>
+<head>
+<title>BKU Auswahl</title>
+</head>
+<body>
+<h1>BKU Auswahl</h1>
+<p>
+<form method="post" action="<%=request.getParameter("returnURI")%>">
+<select name="bkuURI">
+ <option value="http://localhost:3495/http-security-layer-request" selected>Lokale Bürgerkarte</option>
+ <option value="https://provider1.at:3496/http-security-layer-request">Provider eins</option>
+ <option value="https://provider2.at:3496/http-security-layer-request">Provider zwei</option>
+ <option value="https://10.16.126.28:3496/http-security-layer-request">Bürgerkarte Arbeitsplatz Paul Ivancsics</option>
+</select>
+<input type="submit" value="Auswählen"/>
+</form>
+</p>
+</body>
+</html>
\ No newline at end of file diff --git a/id.oa/html/form.jsp b/id.oa/html/form.jsp new file mode 100644 index 000000000..d439fa84d --- /dev/null +++ b/id.oa/html/form.jsp @@ -0,0 +1,20 @@ +<%@ page import="java.util.*" %>
+<html>
+<head>
+<title>Sample Online Application</title>
+</head>
+<body>
+<h1>Sample Form</h1>
+<p>
+<form action="form.jsp">
+<% String param1 = request.getParameter("param1");
+ if (param1 == null) param1 = ""; %>
+Input some text:
+<input type="text" name="param1" size="10"/>
+<br>Previous text input: <%=param1%><br>
+<input type="submit" value="Send"/>
+</form>
+</p>
+<p><a href="index.jsp">Back</a></p>
+</body>
+</html>
\ No newline at end of file diff --git a/id.oa/html/getBKUSelectTag.jsp b/id.oa/html/getBKUSelectTag.jsp new file mode 100644 index 000000000..028dbd348 --- /dev/null +++ b/id.oa/html/getBKUSelectTag.jsp @@ -0,0 +1,6 @@ +<select name="bkuURI">
+ <option value="http://localhost:3495/http-security-layer-request" selected>Lokale Bürgerkarte</option>
+ <option value="https://provider1.at:3496/http-security-layer-request">Provider eins</option>
+ <option value="https://provider2.at:3496/http-security-layer-request">Provider zwei</option>
+ <option value="https://10.16.126.28:3496/http-security-layer-request">Bürgerkarte Arbeitsplatz Paul Ivancsics</option>
+</select>
diff --git a/id.oa/html/index.jsp b/id.oa/html/index.jsp new file mode 100644 index 000000000..5111e5103 --- /dev/null +++ b/id.oa/html/index.jsp @@ -0,0 +1,56 @@ +<%@ page import="java.util.*,javax.servlet.http.*,sun.misc.BASE64Decoder" %>
+<html>
+<head>
+<title>Sample Online Application</title>
+</head>
+<body>
+<h1>Sample Online Application</h1>
+
+<p>Request headers:
+<table border="1">
+ <%
+ /* collect parameters from request */
+ for (Enumeration enum = request.getHeaderNames(); enum.hasMoreElements(); ) {
+ String key = (String) enum.nextElement();
+ String value = request.getHeader(key); %>
+ <tr><td><%=key%></td><td><%=value%></td></tr>
+ <% } %>
+</table>
+</p>
+
+<p>Request parameters:
+<table border="1">
+ <%
+ /* collect parameters from request */
+ for (Enumeration enum = request.getParameterNames(); enum.hasMoreElements(); ) {
+ String name = (String) enum.nextElement();
+ String value = request.getParameter(name); %>
+ <tr><td><%=name%></td><td><%=value%></td></tr>
+ <% } %>
+</table>
+</p>
+
+<p>Cookies:
+<table border="1">
+ <%
+ /* collect attributes from request */
+ Cookie[] cookies = request.getCookies();
+ if (cookies != null) {
+ for (int i = 0; i < cookies.length; i++) {
+ Cookie cookie = cookies[i]; %>
+ <tr><td><%=cookie.getName()%></td><td><%=cookie.getValue()%></td></tr>
+ <% }
+ } %>
+</table>
+</p>
+
+<% String authHeader = request.getHeader("Authorization");
+ if (authHeader != null) {
+ authHeader = authHeader.substring(authHeader.indexOf(" ")+1);
+ String decAuthHeader = new String(new BASE64Decoder().decodeBuffer(authHeader));
+%>
+<p>Basic authentication credentials: <%=decAuthHeader%></p>
+<% } %>
+<p><a href="form.jsp">Form sample</a></p>
+</body>
+</html>
\ No newline at end of file diff --git a/id.oa/html/stateful_login.jsp b/id.oa/html/stateful_login.jsp new file mode 100644 index 000000000..eaede507f --- /dev/null +++ b/id.oa/html/stateful_login.jsp @@ -0,0 +1,29 @@ +<%@ page import="javax.servlet.http.*" %>
+<%
+ /* check request's remote IP address - must be moa-id-proxy's address */
+ String remoteIPAddress = request.getRemoteAddr();
+ if (! "127.0.0.1".equals(remoteIPAddress)) { /* Substitute "127.0.0.1" for moa-id-proxy's IP address */
+ response.setStatus(403);
+ return;
+ }
+
+ /* store authentication data in cookies */
+ String fn = request.getParameter("FamilyName");
+ String gn = request.getParameter("GivenName");
+ /* set cookie domain and cookie path ! */
+ String cookieDomain = ".test.test"; /* Set this to the common domain of moa-id-proxy and of the online application */
+ String cookiePath = request.getContextPath(); /* Set this to the context path of the online application */
+
+ Cookie cfn = new Cookie("familyname", fn);
+ cfn.setDomain(cookieDomain);
+ cfn.setPath(cookiePath);
+ response.addCookie(cfn);
+
+ Cookie cgn = new Cookie("givenname", gn);
+ cgn.setDomain(cookieDomain);
+ cgn.setPath(cookiePath);
+ response.addCookie(cgn);
+
+ /* redirect to online application's start page */
+ response.sendRedirect("http://oa.test.test:8080/oa/index.jsp"); /* Substitute for URL in online application */
+%>
|