aboutsummaryrefslogtreecommitdiff
path: root/id/server
diff options
context:
space:
mode:
Diffstat (limited to 'id/server')
-rw-r--r--id/server/idserverlib/pom.xml5
-rw-r--r--id/server/mw-messages-api/.classpath32
-rw-r--r--id/server/mw-messages-api/.gitignore1
-rw-r--r--id/server/mw-messages-api/.project36
-rw-r--r--id/server/mw-messages-api/.settings/org.eclipse.core.resources.prefs5
-rw-r--r--id/server/mw-messages-api/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--id/server/mw-messages-api/.settings/org.eclipse.m2e.core.prefs4
-rw-r--r--id/server/mw-messages-api/.settings/org.eclipse.wst.common.component6
-rw-r--r--id/server/mw-messages-api/.settings/org.eclipse.wst.common.project.facet.core.xml5
-rw-r--r--id/server/mw-messages-api/.settings/org.eclipse.wst.validation.prefs2
-rw-r--r--id/server/mw-messages-api/mw-messages-api.iml17
-rw-r--r--id/server/mw-messages-api/nb-configuration.xml18
-rw-r--r--id/server/mw-messages-api/pom.xml65
-rw-r--r--id/server/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/GetAuthDataRequest.java52
-rw-r--r--id/server/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/StartAuthResponse.java129
-rw-r--r--id/server/mw-messages-api/src/test/java/eu/stork/mw/core/mwmessagesapi/AppTest.java38
-rw-r--r--id/server/pom.xml1
17 files changed, 424 insertions, 0 deletions
diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml
index cfd028403..765edf7c8 100644
--- a/id/server/idserverlib/pom.xml
+++ b/id/server/idserverlib/pom.xml
@@ -29,6 +29,11 @@
<artifactId>stork-saml-engine</artifactId>
<version>1.5.2</version>
</dependency>
+ <dependency>
+ <groupId>MOA.id</groupId>
+ <artifactId>mw-messages-api</artifactId>
+ <version>2.0</version>
+ </dependency>
<dependency>
<groupId>MOA.id.server</groupId>
<artifactId>moa-id-commons</artifactId>
diff --git a/id/server/mw-messages-api/.classpath b/id/server/mw-messages-api/.classpath
new file mode 100644
index 000000000..8b5a9fa96
--- /dev/null
+++ b/id/server/mw-messages-api/.classpath
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ <attribute name="org.eclipse.jst.component.nondependency" value=""/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/id/server/mw-messages-api/.gitignore b/id/server/mw-messages-api/.gitignore
new file mode 100644
index 000000000..ea8c4bf7f
--- /dev/null
+++ b/id/server/mw-messages-api/.gitignore
@@ -0,0 +1 @@
+/target
diff --git a/id/server/mw-messages-api/.project b/id/server/mw-messages-api/.project
new file mode 100644
index 000000000..cc4d05bc1
--- /dev/null
+++ b/id/server/mw-messages-api/.project
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>mw-messages-api</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/id/server/mw-messages-api/.settings/org.eclipse.core.resources.prefs b/id/server/mw-messages-api/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..839d647ee
--- /dev/null
+++ b/id/server/mw-messages-api/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding//src/test/java=UTF-8
+encoding/<project>=UTF-8
diff --git a/id/server/mw-messages-api/.settings/org.eclipse.jdt.core.prefs b/id/server/mw-messages-api/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..45a6e0e0d
--- /dev/null
+++ b/id/server/mw-messages-api/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/id/server/mw-messages-api/.settings/org.eclipse.m2e.core.prefs b/id/server/mw-messages-api/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 000000000..f897a7f1c
--- /dev/null
+++ b/id/server/mw-messages-api/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/id/server/mw-messages-api/.settings/org.eclipse.wst.common.component b/id/server/mw-messages-api/.settings/org.eclipse.wst.common.component
new file mode 100644
index 000000000..ec983b870
--- /dev/null
+++ b/id/server/mw-messages-api/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="mw-messages-api">
+ <wb-resource deploy-path="/" source-path="/src/main/java"/>
+ <wb-resource deploy-path="/" source-path="/src/main/resources"/>
+ </wb-module>
+</project-modules>
diff --git a/id/server/mw-messages-api/.settings/org.eclipse.wst.common.project.facet.core.xml b/id/server/mw-messages-api/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 000000000..a1f6907b8
--- /dev/null
+++ b/id/server/mw-messages-api/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <installed facet="java" version="1.5"/>
+ <installed facet="jst.utility" version="1.0"/>
+</faceted-project>
diff --git a/id/server/mw-messages-api/.settings/org.eclipse.wst.validation.prefs b/id/server/mw-messages-api/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 000000000..04cad8cb7
--- /dev/null
+++ b/id/server/mw-messages-api/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,2 @@
+disabled=06target
+eclipse.preferences.version=1
diff --git a/id/server/mw-messages-api/mw-messages-api.iml b/id/server/mw-messages-api/mw-messages-api.iml
new file mode 100644
index 000000000..df1c138c5
--- /dev/null
+++ b/id/server/mw-messages-api/mw-messages-api.iml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/target/classes" />
+ <output-test url="file://$MODULE_DIR$/target/test-classes" />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+ <excludeFolder url="file://$MODULE_DIR$/target" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" />
+ </component>
+</module>
+
diff --git a/id/server/mw-messages-api/nb-configuration.xml b/id/server/mw-messages-api/nb-configuration.xml
new file mode 100644
index 000000000..c51afd41b
--- /dev/null
+++ b/id/server/mw-messages-api/nb-configuration.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-shared-configuration>
+ <!--
+This file contains additional configuration written by modules in the NetBeans IDE.
+The configuration is intended to be shared among all the users of project and
+therefore it is assumed to be part of version control checkout.
+Without this configuration present, some functionality in the IDE may be limited or fail altogether.
+-->
+ <properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
+ <!--
+Properties that influence various parts of the IDE, especially code formatting and the like.
+You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
+That way multiple projects can share the same settings (useful for formatting rules for example).
+Any value defined here will override the pom.xml file value but is only applicable to the current project.
+-->
+ <netbeans.hint.jdkPlatform>JDK_1.5</netbeans.hint.jdkPlatform>
+ </properties>
+</project-shared-configuration>
diff --git a/id/server/mw-messages-api/pom.xml b/id/server/mw-messages-api/pom.xml
new file mode 100644
index 000000000..0e930ff52
--- /dev/null
+++ b/id/server/mw-messages-api/pom.xml
@@ -0,0 +1,65 @@
+<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.id</groupId>
+ <artifactId>mw-messages-api</artifactId>
+ <packaging>jar</packaging>
+ <version>2.0</version>
+ <name>mw-messages-api</name>
+ <url>http://maven.apache.org</url>
+ <ciManagement>
+ <system>hudson</system>
+ <url>https://vidp.openlimit.com:8120/hudson/job/mw-messages-api/</url>
+ </ciManagement>
+ <distributionManagement>
+ <repository>
+ <id>central</id>
+ <name>STORK-releases</name>
+ <url>https://vidp.openlimit.com:8120/artifactory/libs-release-local</url>
+ </repository>
+</distributionManagement>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <configLocation>config/sun_checks.xml</configLocation>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+</project>
+
+
+
diff --git a/id/server/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/GetAuthDataRequest.java b/id/server/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/GetAuthDataRequest.java
new file mode 100644
index 000000000..fab637408
--- /dev/null
+++ b/id/server/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/GetAuthDataRequest.java
@@ -0,0 +1,52 @@
+/**
+ *
+ */
+package eu.stork.vidp.api.messages;
+
+/**
+ * Encapsulates the necessary data for a GetAuthDataRequest to a SPWare
+ *
+ * @author bzwattendorfer
+ *
+ */
+public class GetAuthDataRequest {
+
+ public GetAuthDataRequest() {
+ }
+ String sessionID;
+
+ /**
+ * Constructs a GetAuthDataRequest object
+ * @param sessionID SessionID
+ */
+ public GetAuthDataRequest(String sessionID) {
+ super();
+ this.sessionID = sessionID;
+ }
+
+ /**
+ * Gets the sessionID
+ * @return sessionID
+ */
+ public String getSessionID() {
+ return sessionID;
+ }
+
+ /**
+ * Sets the session ID
+ * @param sessionID sessionID
+ */
+ public void setSessionID(String sessionID) {
+ this.sessionID = sessionID;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("GetAuthDataRequest [");
+ builder.append("sessionID=");
+ builder.append(sessionID);
+ builder.append("]");
+ return builder.toString();
+ }
+}
diff --git a/id/server/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/StartAuthResponse.java b/id/server/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/StartAuthResponse.java
new file mode 100644
index 000000000..df63afa0e
--- /dev/null
+++ b/id/server/mw-messages-api/src/main/java/eu/stork/vidp/api/messages/StartAuthResponse.java
@@ -0,0 +1,129 @@
+/**
+ *
+ */
+package eu.stork.vidp.api.messages;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Arrays;
+
+/**
+ * Class encapsulating the HTML content to be returned to the user's browser
+ *
+ * @author bzwattendorfer
+ *
+ */
+public class StartAuthResponse implements Serializable {
+
+ private int httpStatusCode;
+ private byte[] content;
+ private Map<String, String> httpHeaders;
+
+ /**
+ * Creates a new StartAuthenticationResponse object
+ * @param httpStatusCode HTTP Status code to be returned to the user's browser
+ * @param content HTML content to be returned to the user's browser
+ * @param httpHeaders HTTP headers to be returned to the user's browser
+ */
+ public StartAuthResponse() {
+ super();
+ }
+
+ public StartAuthResponse(int httpStatusCode, byte[] content,
+ Map<String, String> httpHeaders) {
+ super();
+ this.httpStatusCode = httpStatusCode;
+ this.content = content;
+ this.httpHeaders = httpHeaders;
+ }
+
+ /**
+ * Creates a new StartAuthenticationResponse object
+ * @param httpStatusCode HTTP Status code to be returned to the user's browser
+ * @param content HTML content to be returned to the user's browser
+ */
+ public StartAuthResponse(int httpStatusCode, byte[] content) {
+ super();
+ this.httpStatusCode = httpStatusCode;
+ this.content = content;
+ this.httpHeaders = new HashMap<String, String>();
+ }
+
+ /**
+ * Gets the HTTP status code
+ * @return HTTP status code
+ */
+ public int getHttpStatusCode() {
+ return httpStatusCode;
+ }
+
+ /**
+ * Sets the HTTP status code
+ * @param httpStatusCode HTTP status code
+ */
+ public void setHttpStatusCode(int httpStatusCode) {
+ this.httpStatusCode = httpStatusCode;
+ }
+
+ /**
+ * Gets the HTML content
+ * @return HTML content
+ */
+ public byte[] getContent() {
+ return content;
+ }
+
+ /**
+ * Sets the HTML content
+ * @param content HTML content
+ */
+ public void setContent(byte[] content) {
+ this.content = content;
+ }
+
+ /**
+ * Gets the Map containing the HTTP headers
+ * @return HTTP header map
+ */
+ public Map<String, String> getHttpHeaders() {
+ return httpHeaders;
+ }
+
+ /**
+ * Sets the Map with HTTP Headers
+ * @param httpHeaders HTTP Headers Map
+ */
+ public void setHttpHeaders(Map<String, String> httpHeaders) {
+ this.httpHeaders = httpHeaders;
+ }
+
+ /**
+ * Adds a HTTP Header to the Map
+ * @param key HTTP Header name
+ * @param value HTTP Header value
+ */
+ public void addHeader(String key, String value) {
+ }
+
+ /**
+ * Removes a HTTP Header
+ * @param key HTTP Header name
+ */
+ public void removeHeader(String key) {
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("StartAuthResponse [");
+ builder.append("content=");
+ builder.append(Arrays.toString(content));
+ builder.append(", httpHeaders=");
+ builder.append(httpHeaders);
+ builder.append(", httpStatusCode=");
+ builder.append(httpStatusCode);
+ builder.append("]");
+ return builder.toString();
+ }
+}
diff --git a/id/server/mw-messages-api/src/test/java/eu/stork/mw/core/mwmessagesapi/AppTest.java b/id/server/mw-messages-api/src/test/java/eu/stork/mw/core/mwmessagesapi/AppTest.java
new file mode 100644
index 000000000..8845aa855
--- /dev/null
+++ b/id/server/mw-messages-api/src/test/java/eu/stork/mw/core/mwmessagesapi/AppTest.java
@@ -0,0 +1,38 @@
+package eu.stork.mw.core.mwmessagesapi;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public AppTest( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( AppTest.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp()
+ {
+ assertTrue( true );
+ }
+}
diff --git a/id/server/pom.xml b/id/server/pom.xml
index 0f9531abf..de44dca86 100644
--- a/id/server/pom.xml
+++ b/id/server/pom.xml
@@ -19,6 +19,7 @@
<module>auth</module>
<module>stork-saml-engine</module>
<module>moa-id-commons</module>
+ <module>mw-messages-api</module>
</modules>
<properties>