summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/.cvsignore1
-rw-r--r--java/Makefile16
-rw-r--r--java/src/c/.cvsignore2
-rw-r--r--java/src/c/com_entrouvert_lasso_Lasso.c6
-rw-r--r--java/src/c/com_entrouvert_lasso_LassoAuthnRequest.c6
-rw-r--r--java/src/c/com_entrouvert_lasso_LassoAuthnResponse.c46
-rw-r--r--java/src/c/com_entrouvert_lasso_LassoLogin.c6
-rw-r--r--java/src/c/com_entrouvert_lasso_LassoLogout.c6
-rw-r--r--java/src/c/com_entrouvert_lasso_LassoNode.c6
-rw-r--r--java/src/c/com_entrouvert_lasso_LassoObject.c27
-rw-r--r--java/src/c/com_entrouvert_lasso_LassoProfileContext.c46
-rw-r--r--java/src/c/com_entrouvert_lasso_LassoProvider.c46
-rw-r--r--java/src/c/com_entrouvert_lasso_LassoRequest.c6
-rw-r--r--java/src/c/com_entrouvert_lasso_LassoResponse.c6
-rw-r--r--java/src/c/com_entrouvert_lasso_LassoServer.c15
-rw-r--r--java/src/c/com_entrouvert_lasso_LassoUser.c6
-rw-r--r--java/src/java/com/entrouvert/lasso/Lasso.java19
-rw-r--r--java/src/java/com/entrouvert/lasso/LassoAuthnRequest.java18
-rw-r--r--java/src/java/com/entrouvert/lasso/LassoAuthnResponse.java17
-rw-r--r--java/src/java/com/entrouvert/lasso/LassoLogin.java18
-rw-r--r--java/src/java/com/entrouvert/lasso/LassoLogout.java18
-rw-r--r--java/src/java/com/entrouvert/lasso/LassoNode.java27
-rw-r--r--java/src/java/com/entrouvert/lasso/LassoObject.java34
-rw-r--r--java/src/java/com/entrouvert/lasso/LassoProfileContext.java20
-rw-r--r--java/src/java/com/entrouvert/lasso/LassoProvider.java20
-rw-r--r--java/src/java/com/entrouvert/lasso/LassoRequest.java18
-rw-r--r--java/src/java/com/entrouvert/lasso/LassoResponse.java18
-rw-r--r--java/src/java/com/entrouvert/lasso/LassoServer.java24
-rw-r--r--java/src/java/com/entrouvert/lasso/LassoTest.java19
-rw-r--r--java/src/java/com/entrouvert/lasso/LassoUser.java20
-rw-r--r--java/target/.cvsignore2
-rw-r--r--java/tests/.cvsignore1
-rw-r--r--java/tests/LoginTest.java85
33 files changed, 318 insertions, 307 deletions
diff --git a/java/.cvsignore b/java/.cvsignore
new file mode 100644
index 00000000..71fd50ea
--- /dev/null
+++ b/java/.cvsignore
@@ -0,0 +1 @@
+_usr_share_kaffe_Klasses_jar.h
diff --git a/java/Makefile b/java/Makefile
index c4aec60e..e5951fde 100644
--- a/java/Makefile
+++ b/java/Makefile
@@ -1,8 +1,14 @@
TARGET=target
-JAVAC=/opt/jdk/bin/javac
-JAVAH=/opt/jdk/bin/javah
-JAR=/opt/jdk/bin/jar
+#JAVAC=/opt/jdk/bin/javac
+#JAVAH=/opt/jdk/bin/javah
+#JAVAH_CLASSPATH_PREFIX=
+#JAR=/opt/jdk/bin/jar
+
+JAVAC=/usr/lib/kaffe/bin/javac
+JAVAH=/usr/lib/kaffe/bin/javah
+JAVAH_CLASSPATH_PREFIX=/usr/share/kaffe/Klasses.jar:
+JAR=/usr/lib/kaffe/bin/jar
JAVA_BUILD_DIR=${TARGET}/classes
JAVA_SOURCE_DIR=src/java
@@ -27,7 +33,7 @@ binary-java:
${JAR} cf ${LASSO.JAR} -C ${JAVA_BUILD_DIR} com
generate-header: binary-java
- ${JAVAH} -d ${C_SOURCE_DIR} -classpath ${JAVA_BUILD_DIR} ${JAVA_CLASSES}
+ ${JAVAH} -d ${C_SOURCE_DIR} -classpath ${JAVAH_CLASSPATH_PREFIX}${JAVA_BUILD_DIR} ${JAVA_CLASSES}
binary-c: ${LASSO.SO}
@@ -35,7 +41,7 @@ ${C_OBJECT}: ${C_SOURCE}
${MAKE} -C ${C_SOURCE_DIR}
${LASSO.SO}: generate-header ${C_OBJECT}
- $(CC) -shared ${C_OBJECT} -o $@
+ $(CC) -shared -lgobject-2.0 -lglib-2.0 -llasso ${C_OBJECT} -o $@
clean:
${MAKE} -C ${C_SOURCE_DIR} clean
diff --git a/java/src/c/.cvsignore b/java/src/c/.cvsignore
new file mode 100644
index 00000000..36283c56
--- /dev/null
+++ b/java/src/c/.cvsignore
@@ -0,0 +1,2 @@
+com_entrouvert_lasso_*.h
+target_classes.h
diff --git a/java/src/c/com_entrouvert_lasso_Lasso.c b/java/src/c/com_entrouvert_lasso_Lasso.c
index 6ef512ea..cc56abce 100644
--- a/java/src/c/com_entrouvert_lasso_Lasso.c
+++ b/java/src/c/com_entrouvert_lasso_Lasso.c
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/java/src/c/com_entrouvert_lasso_LassoAuthnRequest.c b/java/src/c/com_entrouvert_lasso_LassoAuthnRequest.c
index 2069cd2d..1ab39c0e 100644
--- a/java/src/c/com_entrouvert_lasso_LassoAuthnRequest.c
+++ b/java/src/c/com_entrouvert_lasso_LassoAuthnRequest.c
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/java/src/c/com_entrouvert_lasso_LassoAuthnResponse.c b/java/src/c/com_entrouvert_lasso_LassoAuthnResponse.c
index c783e730..866ef6a6 100644
--- a/java/src/c/com_entrouvert_lasso_LassoAuthnResponse.c
+++ b/java/src/c/com_entrouvert_lasso_LassoAuthnResponse.c
@@ -1,26 +1,26 @@
-/* $Id$
-*
-* JLasso -- Java bindings for Lasso library
-*
-* Copyright (C) 2004 Entr'ouvert
-* http://lasso.labs.libre-entreprise.org
-*
-* Authors: Benjamin Poussin <poussin@codelutin.com>
-*
-* This program is free software{} you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation{} either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY{} without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program{} if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * JLasso -- Java bindings for Lasso library
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.com
+ *
+ * Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
#include <helper.h>
#include <com_entrouvert_lasso_LassoAuthnResponse.h>
diff --git a/java/src/c/com_entrouvert_lasso_LassoLogin.c b/java/src/c/com_entrouvert_lasso_LassoLogin.c
index b544ca2d..13058099 100644
--- a/java/src/c/com_entrouvert_lasso_LassoLogin.c
+++ b/java/src/c/com_entrouvert_lasso_LassoLogin.c
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/java/src/c/com_entrouvert_lasso_LassoLogout.c b/java/src/c/com_entrouvert_lasso_LassoLogout.c
index 5d899eac..f67893fb 100644
--- a/java/src/c/com_entrouvert_lasso_LassoLogout.c
+++ b/java/src/c/com_entrouvert_lasso_LassoLogout.c
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/java/src/c/com_entrouvert_lasso_LassoNode.c b/java/src/c/com_entrouvert_lasso_LassoNode.c
index 2d965736..44296ddf 100644
--- a/java/src/c/com_entrouvert_lasso_LassoNode.c
+++ b/java/src/c/com_entrouvert_lasso_LassoNode.c
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/java/src/c/com_entrouvert_lasso_LassoObject.c b/java/src/c/com_entrouvert_lasso_LassoObject.c
new file mode 100644
index 00000000..c4076db9
--- /dev/null
+++ b/java/src/c/com_entrouvert_lasso_LassoObject.c
@@ -0,0 +1,27 @@
+/*
+ * JLasso -- Java bindings for Lasso library
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.com
+ *
+ * Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <helper.h>
+#include <lasso/lasso.h>
+#include <com_entrouvert_lasso_LassoNode.h>
diff --git a/java/src/c/com_entrouvert_lasso_LassoProfileContext.c b/java/src/c/com_entrouvert_lasso_LassoProfileContext.c
index 0f66df9d..56dc0afa 100644
--- a/java/src/c/com_entrouvert_lasso_LassoProfileContext.c
+++ b/java/src/c/com_entrouvert_lasso_LassoProfileContext.c
@@ -1,26 +1,26 @@
-/* $Id$
-*
-* JLasso -- Java bindings for Lasso library
-*
-* Copyright (C) 2004 Entr'ouvert
-* http://lasso.labs.libre-entreprise.org
-*
-* Authors: Benjamin Poussin <poussin@codelutin.com>
-*
-* This program is free software{} you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation{} either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY{} without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program{} if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * JLasso -- Java bindings for Lasso library
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.com
+ *
+ * Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
#include <helper.h>
#include <lasso/lasso.h>
diff --git a/java/src/c/com_entrouvert_lasso_LassoProvider.c b/java/src/c/com_entrouvert_lasso_LassoProvider.c
index b089e09f..ee4decc0 100644
--- a/java/src/c/com_entrouvert_lasso_LassoProvider.c
+++ b/java/src/c/com_entrouvert_lasso_LassoProvider.c
@@ -1,26 +1,26 @@
-/* $Id$
-*
-* JLasso -- Java bindings for Lasso library
-*
-* Copyright (C) 2004 Entr'ouvert
-* http://lasso.labs.libre-entreprise.org
-*
-* Authors: Benjamin Poussin <poussin@codelutin.com>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * JLasso -- Java bindings for Lasso library
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.com
+ *
+ * Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
#include <helper.h>
#include <lasso/lasso.h>
diff --git a/java/src/c/com_entrouvert_lasso_LassoRequest.c b/java/src/c/com_entrouvert_lasso_LassoRequest.c
index 74790be5..9c7e8ee3 100644
--- a/java/src/c/com_entrouvert_lasso_LassoRequest.c
+++ b/java/src/c/com_entrouvert_lasso_LassoRequest.c
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/java/src/c/com_entrouvert_lasso_LassoResponse.c b/java/src/c/com_entrouvert_lasso_LassoResponse.c
index ad294c2a..1f574afb 100644
--- a/java/src/c/com_entrouvert_lasso_LassoResponse.c
+++ b/java/src/c/com_entrouvert_lasso_LassoResponse.c
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/java/src/c/com_entrouvert_lasso_LassoServer.c b/java/src/c/com_entrouvert_lasso_LassoServer.c
index ac4072f6..a975eb94 100644
--- a/java/src/c/com_entrouvert_lasso_LassoServer.c
+++ b/java/src/c/com_entrouvert_lasso_LassoServer.c
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -102,3 +102,12 @@ JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoServer_dump
return (*env)->NewStringUTF(env, result);
}
+
+JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoServer_destroy
+(JNIEnv * env, jobject this){
+
+ void* server = (LassoServer*)getCObject(env, this);
+
+ lasso_server_destroy(server);
+}
+
diff --git a/java/src/c/com_entrouvert_lasso_LassoUser.c b/java/src/c/com_entrouvert_lasso_LassoUser.c
index 5897e3d5..9cce3d58 100644
--- a/java/src/c/com_entrouvert_lasso_LassoUser.c
+++ b/java/src/c/com_entrouvert_lasso_LassoUser.c
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/java/src/java/com/entrouvert/lasso/Lasso.java b/java/src/java/com/entrouvert/lasso/Lasso.java
index 96c765db..2ab165d4 100644
--- a/java/src/java/com/entrouvert/lasso/Lasso.java
+++ b/java/src/java/com/entrouvert/lasso/Lasso.java
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,19 +22,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
-/* *
- * Lasso.java
- *
- * Created: 17 juil. 2004
- *
- * @author Benjamin Poussin <poussin@codelutin.com>
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-
package com.entrouvert.lasso;
public class Lasso { // Lasso
diff --git a/java/src/java/com/entrouvert/lasso/LassoAuthnRequest.java b/java/src/java/com/entrouvert/lasso/LassoAuthnRequest.java
index 6fbf0e6f..075138e1 100644
--- a/java/src/java/com/entrouvert/lasso/LassoAuthnRequest.java
+++ b/java/src/java/com/entrouvert/lasso/LassoAuthnRequest.java
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,18 +22,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* *
- * LassoRequest.java
- *
- * Created: 17 juil. 2004
- *
- * @author Benjamin Poussin <poussin@codelutin.com>
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-
package com.entrouvert.lasso;
public class LassoAuthnRequest extends LassoNode { // LassoAuthnRequest
diff --git a/java/src/java/com/entrouvert/lasso/LassoAuthnResponse.java b/java/src/java/com/entrouvert/lasso/LassoAuthnResponse.java
index f890521b..69b49151 100644
--- a/java/src/java/com/entrouvert/lasso/LassoAuthnResponse.java
+++ b/java/src/java/com/entrouvert/lasso/LassoAuthnResponse.java
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,17 +21,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* *
- * LassoAuthnResponse.java
- *
- * Created: 19 juil. 2004
- *
- * @author Benjamin Poussin <poussin@codelutin.com>
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
package com.entrouvert.lasso;
diff --git a/java/src/java/com/entrouvert/lasso/LassoLogin.java b/java/src/java/com/entrouvert/lasso/LassoLogin.java
index 881007cd..3c064510 100644
--- a/java/src/java/com/entrouvert/lasso/LassoLogin.java
+++ b/java/src/java/com/entrouvert/lasso/LassoLogin.java
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,18 +22,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* *
- * LassoLogin.java
- *
- * Created: 16 juil. 2004
- *
- * @author Benjamin Poussin <poussin@codelutin.com>
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-
package com.entrouvert.lasso;
public class LassoLogin extends LassoProfileContext { // LassoLogin
diff --git a/java/src/java/com/entrouvert/lasso/LassoLogout.java b/java/src/java/com/entrouvert/lasso/LassoLogout.java
index 3d9bd44c..a78f31a3 100644
--- a/java/src/java/com/entrouvert/lasso/LassoLogout.java
+++ b/java/src/java/com/entrouvert/lasso/LassoLogout.java
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,18 +22,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* *
- * LassoLogout.java
- *
- * Created: 16 juil. 2004
- *
- * @author Benjamin Poussin <poussin@codelutin.com>
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-
package com.entrouvert.lasso;
public class LassoLogout extends LassoProfileContext { // LassoLogout
diff --git a/java/src/java/com/entrouvert/lasso/LassoNode.java b/java/src/java/com/entrouvert/lasso/LassoNode.java
index 29780d0f..4c589053 100644
--- a/java/src/java/com/entrouvert/lasso/LassoNode.java
+++ b/java/src/java/com/entrouvert/lasso/LassoNode.java
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,30 +22,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* *
- * LassoNode.java
- *
- * Created: 17 juil. 2004
- *
- * @author Benjamin Poussin <poussin@codelutin.com>
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-
package com.entrouvert.lasso;
-public abstract class LassoNode { // LassoNode
-
- /** used to store ref to the c real object, this field must be used only by native methode */
- protected long c_lasso_object = 0;
+public abstract class LassoNode extends LassoObject { // LassoNode
protected void finalize(){
destroy();
}
native protected void destroy();
-
-} // LassoNode
-
+} // LassoNode
diff --git a/java/src/java/com/entrouvert/lasso/LassoObject.java b/java/src/java/com/entrouvert/lasso/LassoObject.java
new file mode 100644
index 00000000..fc87287e
--- /dev/null
+++ b/java/src/java/com/entrouvert/lasso/LassoObject.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * JLasso -- Java bindings for Lasso library
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.labs.libre-entreprise.org
+ *
+ * Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+package com.entrouvert.lasso;
+
+public abstract class LassoObject { // LassoObject
+
+ /** used to store ref to the c real object, this field must be used only by native methode */
+ protected long c_lasso_object = 0;
+
+} // LassoObject
+
diff --git a/java/src/java/com/entrouvert/lasso/LassoProfileContext.java b/java/src/java/com/entrouvert/lasso/LassoProfileContext.java
index d1f21a9b..831afba7 100644
--- a/java/src/java/com/entrouvert/lasso/LassoProfileContext.java
+++ b/java/src/java/com/entrouvert/lasso/LassoProfileContext.java
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,21 +22,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* *
- * LassoProfileContext.java
- *
- * Created: 18 juil. 2004
- *
- * @author Benjamin Poussin <poussin@codelutin.com>
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-
package com.entrouvert.lasso;
-public abstract class LassoProfileContext extends LassoNode { // LassoProfileContext
+public abstract class LassoProfileContext extends LassoObject { // LassoProfileContext
protected LassoServer server = null;
protected LassoUser user = null;
diff --git a/java/src/java/com/entrouvert/lasso/LassoProvider.java b/java/src/java/com/entrouvert/lasso/LassoProvider.java
index a95165f4..63a68e1a 100644
--- a/java/src/java/com/entrouvert/lasso/LassoProvider.java
+++ b/java/src/java/com/entrouvert/lasso/LassoProvider.java
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,21 +22,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* *
- * LassoProvider.java
- *
- * Created: 18 juil. 2004
- *
- * @author Benjamin Poussin <poussin@codelutin.com>
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-
package com.entrouvert.lasso;
-public class LassoProvider extends LassoNode { // LassoProvider
+public class LassoProvider extends LassoObject { // LassoProvider
protected LassoNode metadata = null;
diff --git a/java/src/java/com/entrouvert/lasso/LassoRequest.java b/java/src/java/com/entrouvert/lasso/LassoRequest.java
index 5044b572..f5cc3b88 100644
--- a/java/src/java/com/entrouvert/lasso/LassoRequest.java
+++ b/java/src/java/com/entrouvert/lasso/LassoRequest.java
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,18 +22,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* *
- * LassoRequest.java
- *
- * Created: 17 juil. 2004
- *
- * @author Benjamin Poussin <poussin@codelutin.com>
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-
package com.entrouvert.lasso;
public class LassoRequest extends LassoNode { // LassoRequest
diff --git a/java/src/java/com/entrouvert/lasso/LassoResponse.java b/java/src/java/com/entrouvert/lasso/LassoResponse.java
index ff7c0b61..8958cd7a 100644
--- a/java/src/java/com/entrouvert/lasso/LassoResponse.java
+++ b/java/src/java/com/entrouvert/lasso/LassoResponse.java
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,18 +22,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* *
- * LassoResponse.java
- *
- * Created: 17 juil. 2004
- *
- * @author Benjamin Poussin <poussin@codelutin.com>
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-
package com.entrouvert.lasso;
public class LassoResponse extends LassoNode { // LassoResponse
diff --git a/java/src/java/com/entrouvert/lasso/LassoServer.java b/java/src/java/com/entrouvert/lasso/LassoServer.java
index 44d34420..ceb6565f 100644
--- a/java/src/java/com/entrouvert/lasso/LassoServer.java
+++ b/java/src/java/com/entrouvert/lasso/LassoServer.java
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,18 +22,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* *
- * LassoServer.java
- *
- * Created: 16 juil. 2004
- *
- * @author Benjamin Poussin <poussin@codelutin.com>
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-
package com.entrouvert.lasso;
public class LassoServer extends LassoProvider { // LassoServer
@@ -61,6 +49,10 @@ public class LassoServer extends LassoProvider { // LassoServer
String certificateFilePath,
int lassoSignatureMethodRsaSha1);
+ protected void finalize(){
+ destroy();
+ }
+
/**
* This method must set the c_lasso_object. If creation of LassoServer failed
* then c_lasso_object's value is 0.
@@ -73,5 +65,7 @@ public class LassoServer extends LassoProvider { // LassoServer
native public String dump();
+ native protected void destroy();
+
} // LassoServer
diff --git a/java/src/java/com/entrouvert/lasso/LassoTest.java b/java/src/java/com/entrouvert/lasso/LassoTest.java
index 422fa228..afe43bf9 100644
--- a/java/src/java/com/entrouvert/lasso/LassoTest.java
+++ b/java/src/java/com/entrouvert/lasso/LassoTest.java
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,19 +22,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
-/* *
- * LassoTest.java
- *
- * Created: 16 juil. 2004
- *
- * @author Benjamin Poussin <poussin@codelutin.com>
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-
package com.entrouvert.lasso;
public class LassoTest { // LassoTest
diff --git a/java/src/java/com/entrouvert/lasso/LassoUser.java b/java/src/java/com/entrouvert/lasso/LassoUser.java
index 5654f165..bf6fe49b 100644
--- a/java/src/java/com/entrouvert/lasso/LassoUser.java
+++ b/java/src/java/com/entrouvert/lasso/LassoUser.java
@@ -1,11 +1,11 @@
-/* $Id$
- *
+/*
* JLasso -- Java bindings for Lasso library
*
* Copyright (C) 2004 Entr'ouvert
- * http://lasso.labs.libre-entreprise.org
+ * http://lasso.entrouvert.com
*
* Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,21 +22,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* *
- * LassoUser.java
- *
- * Created: 17 juil. 2004
- *
- * @author Benjamin Poussin <poussin@codelutin.com>
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-
package com.entrouvert.lasso;
-public class LassoUser extends LassoNode { // LassoUser
+public class LassoUser extends LassoObject { // LassoUser
public LassoUser(){
init();
diff --git a/java/target/.cvsignore b/java/target/.cvsignore
new file mode 100644
index 00000000..2410292c
--- /dev/null
+++ b/java/target/.cvsignore
@@ -0,0 +1,2 @@
+classes
+lasso.jar
diff --git a/java/tests/.cvsignore b/java/tests/.cvsignore
new file mode 100644
index 00000000..6b468b62
--- /dev/null
+++ b/java/tests/.cvsignore
@@ -0,0 +1 @@
+*.class
diff --git a/java/tests/LoginTest.java b/java/tests/LoginTest.java
new file mode 100644
index 00000000..cac7bff0
--- /dev/null
+++ b/java/tests/LoginTest.java
@@ -0,0 +1,85 @@
+/*
+ * JLasso -- Java bindings for Lasso library
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.labs.libre-entreprise.org
+ *
+ * Authors: Benjamin Poussin <poussin@codelutin.com>
+ * Emmanuel Raviart <eraviart@entrouvert.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+// To run it:
+// $ export LD_LIBRARY_PATH=../target/
+// $ javac -classpath /usr/share/java/junit.jar:../target/lasso.jar:.:/ LoginTest.java
+// $ java -classpath /usr/share/java/junit.jar:../target/lasso.jar:.:/ LoginTest
+
+import junit.framework.TestCase;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import com.entrouvert.lasso.Lasso;
+import com.entrouvert.lasso.LassoServer;
+
+
+public class LoginTest extends TestCase {
+ public String generateIdentityProviderContextDump() {
+ LassoServer serverContext = new LassoServer(
+ "../../examples/data/idp-metadata.xml",
+ "../../examples/idp-public-key.pem",
+ "../../examples/idp-private-key.pem",
+ "../../examples/idp-crt.pem",
+ 1); // FIXME: Replace with lasso.signatureMethodRsaSha1
+ serverContext.addProvider(
+ "../../examples/data/sp-metadata.xml",
+ "../../examples/sp-public-key.pem",
+ "../../examples/ca-crt.pem");
+ String serverContextDump = serverContext.dump();
+ return serverContextDump;
+ }
+
+ public String generateServiceProviderContextDump() {
+ LassoServer serverContext = new LassoServer(
+ "../../examples/data/sp-metadata.xml",
+ "../../examples/sp-public-key.pem",
+ "../../examples/sp-private-key.pem",
+ "../../examples/sp-crt.pem",
+ 1); // FIXME: Replace with lasso.signatureMethodRsaSha1
+ serverContext.addProvider(
+ "../../examples/data/idp-metadata.xml",
+ "../../examples/idp-public-key.pem",
+ "../../examples/ca-crt.pem");
+ String serverContextDump = serverContext.dump();
+ return serverContextDump;
+ }
+
+ public void testSimpleAdd() {
+ String identityProviderContextDump = generateIdentityProviderContextDump();
+ assertNotNull(identityProviderContextDump);
+ String serviceProviderContextDump = generateServiceProviderContextDump();
+ assertNotNull(serviceProviderContextDump);
+ }
+
+ public static Test suite() {
+ return new TestSuite(LoginTest.class);
+ }
+
+ public static void main(String args[]) {
+ Lasso.init();
+ junit.textui.TestRunner.run(suite());
+ Lasso.shutdown();
+ }
+}