aboutsummaryrefslogtreecommitdiff
path: root/id/oa
diff options
context:
space:
mode:
authorkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2012-02-20 11:21:24 +0000
committerkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2012-02-20 11:21:24 +0000
commitd3352bc9db1891c8f90f8c542eac65da64a234d3 (patch)
treef7b7c932e39e201d22ef5232bf90081c2d357885 /id/oa
parent9b1af165432c82d64f49d3e3730534b224230b53 (diff)
parentb858a62942137068394790a22c10b968e1c41e0f (diff)
downloadmoa-id-spss-d3352bc9db1891c8f90f8c542eac65da64a234d3.tar.gz
moa-id-spss-d3352bc9db1891c8f90f8c542eac65da64a234d3.tar.bz2
moa-id-spss-d3352bc9db1891c8f90f8c542eac65da64a234d3.zip
MOA-IDSPSS Release 1.5.1.tags/1.5.1
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/tags/1.5.1@1271 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id/oa')
-rw-r--r--id/oa/.settings/.jsdtscope11
-rw-r--r--id/oa/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--id/oa/.settings/org.eclipse.wst.common.component8
-rw-r--r--id/oa/.settings/org.eclipse.wst.common.project.facet.core.xml5
-rw-r--r--id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.container1
-rw-r--r--id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.name1
-rw-r--r--id/oa/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--id/oa/pom.xml18
-rw-r--r--id/oa/src/main/webapp/META-INF/MANIFEST.MF3
-rw-r--r--id/oa/src/main/webapp/WEB-INF/web.xml9
-rw-r--r--id/oa/src/main/webapp/auth.jsp48
-rw-r--r--id/oa/src/main/webapp/chooseBKU.jsp19
-rw-r--r--id/oa/src/main/webapp/form.jsp20
-rw-r--r--id/oa/src/main/webapp/getBKUSelectTag.jsp6
-rw-r--r--id/oa/src/main/webapp/index.jsp60
-rw-r--r--id/oa/src/main/webapp/stateful_login.jsp29
16 files changed, 254 insertions, 0 deletions
diff --git a/id/oa/.settings/.jsdtscope b/id/oa/.settings/.jsdtscope
new file mode 100644
index 000000000..f40dd98e2
--- /dev/null
+++ b/id/oa/.settings/.jsdtscope
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
diff --git a/id/oa/.settings/org.eclipse.jdt.core.prefs b/id/oa/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..fe7479929
--- /dev/null
+++ b/id/oa/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Tue Jul 07 16:07:19 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/id/oa/.settings/org.eclipse.wst.common.component b/id/oa/.settings/org.eclipse.wst.common.component
new file mode 100644
index 000000000..3bc38ebcc
--- /dev/null
+++ b/id/oa/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="moa-id-oa">
+ <property name="context-root" value="moa-id-oa"/>
+ <wb-resource deploy-path="/" source-path="src/main/webapp"/>
+ <property name="java-output-path" value="/target/classes"/>
+ </wb-module>
+</project-modules>
diff --git a/id/oa/.settings/org.eclipse.wst.common.project.facet.core.xml b/id/oa/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 000000000..f30a1de6e
--- /dev/null
+++ b/id/oa/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <installed facet="jst.java" version="1.4"/>
+ <installed facet="jst.web" version="2.3"/>
+</faceted-project>
diff --git a/id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.container b/id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 000000000..3bd5d0a48
--- /dev/null
+++ b/id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file
diff --git a/id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.name b/id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 000000000..05bd71b6e
--- /dev/null
+++ b/id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window \ No newline at end of file
diff --git a/id/oa/.settings/org.maven.ide.eclipse.prefs b/id/oa/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..b6ca61b99
--- /dev/null
+++ b/id/oa/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:56 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/id/oa/pom.xml b/id/oa/pom.xml
new file mode 100644
index 000000000..c7fe67540
--- /dev/null
+++ b/id/oa/pom.xml
@@ -0,0 +1,18 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA</groupId>
+ <artifactId>moa-id-oa</artifactId>
+ <packaging>war</packaging>
+ <version>1.0</version>
+ <name>MOA Sample OA</name>
+
+ <properties>
+ <repositoryPath>${basedir}/../../repository</repositoryPath>
+ </properties>
+
+ <build>
+ <finalName>oa</finalName>
+ </build>
+</project>
diff --git a/id/oa/src/main/webapp/META-INF/MANIFEST.MF b/id/oa/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..5e9495128
--- /dev/null
+++ b/id/oa/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/id/oa/src/main/webapp/WEB-INF/web.xml b/id/oa/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 000000000..13158fdaa
--- /dev/null
+++ b/id/oa/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
+
+<web-app>
+ <display-name>Sample OA</display-name>
+ <description>MOA Sample OA</description>
+</web-app>
+
diff --git a/id/oa/src/main/webapp/auth.jsp b/id/oa/src/main/webapp/auth.jsp
new file mode 100644
index 000000000..0b563a83e
--- /dev/null
+++ b/id/oa/src/main/webapp/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/src/main/webapp/chooseBKU.jsp b/id/oa/src/main/webapp/chooseBKU.jsp
new file mode 100644
index 000000000..0135b6fdf
--- /dev/null
+++ b/id/oa/src/main/webapp/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&uuml;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&uuml;rgerkarte Arbeitsplatz Paul Ivancsics</option>
+</select>
+<input type="submit" value="Ausw&auml;hlen"/>
+</form>
+</p>
+</body>
+</html> \ No newline at end of file
diff --git a/id/oa/src/main/webapp/form.jsp b/id/oa/src/main/webapp/form.jsp
new file mode 100644
index 000000000..d439fa84d
--- /dev/null
+++ b/id/oa/src/main/webapp/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/src/main/webapp/getBKUSelectTag.jsp b/id/oa/src/main/webapp/getBKUSelectTag.jsp
new file mode 100644
index 000000000..028dbd348
--- /dev/null
+++ b/id/oa/src/main/webapp/getBKUSelectTag.jsp
@@ -0,0 +1,6 @@
+<select name="bkuURI">
+ <option value="http://localhost:3495/http-security-layer-request" selected>Lokale B&uuml;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&uuml;rgerkarte Arbeitsplatz Paul Ivancsics</option>
+</select>
diff --git a/id/oa/src/main/webapp/index.jsp b/id/oa/src/main/webapp/index.jsp
new file mode 100644
index 000000000..35e49d743
--- /dev/null
+++ b/id/oa/src/main/webapp/index.jsp
@@ -0,0 +1,60 @@
+<%@ 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 headers = request.getHeaderNames(); headers.hasMoreElements(); ) {
+ String key = (String) headers.nextElement();
+ String value = request.getHeader(key); %>
+ <tr><td><%=key%></td><td><%=value%></td></tr>
+ <% } %>
+</table>
+</p>
+
+<% String query=request.getQueryString(); %>
+<p>QueryString: "<%=query%>"
+</p>
+
+<p>Request parameters:
+<table border="1">
+ <%
+ /* collect parameters from request */
+ for (Enumeration params = request.getParameterNames(); params.hasMoreElements(); ) {
+ String name = (String) params.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/src/main/webapp/stateful_login.jsp b/id/oa/src/main/webapp/stateful_login.jsp
new file mode 100644
index 000000000..eaede507f
--- /dev/null
+++ b/id/oa/src/main/webapp/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 */
+%>