diff options
| author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-01-25 23:47:46 +0000 |
|---|---|---|
| committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-01-25 23:47:46 +0000 |
| commit | 641a6af75a8e0befddc5414065042bd71c9a97ad (patch) | |
| tree | 8084096b08577886b87dab70e57be6217ec005d4 /java | |
| parent | bec8672cc57d9afa3da88aa7bf0e251d3b274b5c (diff) | |
| download | lasso-641a6af75a8e0befddc5414065042bd71c9a97ad.tar.gz lasso-641a6af75a8e0befddc5414065042bd71c9a97ad.tar.xz lasso-641a6af75a8e0befddc5414065042bd71c9a97ad.zip | |
Bindings: remove all SWIG bindings and SWIG related files
Diffstat (limited to 'java')
| -rw-r--r-- | java/.cvsignore | 171 | ||||
| -rw-r--r-- | java/Makefile.am | 231 | ||||
| -rw-r--r-- | java/coldfusion/.cvsignore | 1 | ||||
| -rw-r--r-- | java/coldfusion/Makefile | 518 | ||||
| -rw-r--r-- | java/coldfusion/src/CFLassoSingleLogout.java | 101 | ||||
| -rw-r--r-- | java/coldfusion/src/CFLassoSingleSignOn.java | 160 | ||||
| -rw-r--r-- | java/coldfusion/web/assertionConsumer.cfm | 48 | ||||
| -rw-r--r-- | java/coldfusion/web/singleLogout.cfm | 40 | ||||
| -rw-r--r-- | java/coldfusion/web/singleSignOn.cfm | 21 | ||||
| -rw-r--r-- | java/doc/ImplantationMapping.rst | 37 | ||||
| -rw-r--r-- | java/doc/JNIForDummy.rst | 36 | ||||
| -rw-r--r-- | java/tests/.cvsignore | 1 | ||||
| -rw-r--r-- | java/tests/BindingTests.java | 266 | ||||
| -rw-r--r-- | java/tests/LoginTest.java | 244 |
14 files changed, 0 insertions, 1875 deletions
diff --git a/java/.cvsignore b/java/.cvsignore deleted file mode 100644 index 50583c36..00000000 --- a/java/.cvsignore +++ /dev/null @@ -1,171 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -com -lasso.jar -lasso_wrap.c -libjlasso.la -libjlasso_la-lasso_wrap.lo -Authentication.java -Credentials.java -DataService.java -Defederation.java -Description.java -DiscoAuthenticateRequester.java -DiscoAuthenticateSessionContext.java -DiscoAuthorizeRequester.java -DiscoEncryptResourceID.java -DiscoGenerateBearerToken.java -DiscoSendSingleLogout.java -DiscoModify.java -DiscoModifyResponse.java -DiscoQuery.java -DiscoQueryResponse.java -Discovery.java -DowncastableNode.java -DstModification.java -DstModify.java -DstModifyResponse.java -DstQuery.java -DstQueryResponse.java -Federation.java -Identity.java -InsertEntry.java -Lecp.java -LibAssertion.java -LibAuthnRequest.java -LibAuthnResponse.java -LibFederationTerminationNotification.java -LibLogoutRequest.java -LibLogoutResponse.java -LibRegisterNameIdentifierRequest.java -LibRegisterNameIdentifierResponse.java -LibStatusResponse.java -Login.java -Logout.java -NameIdentifierMapping.java -NameRegistration.java -Node.java -NodeArray.java -Options.java -PPMsgContact.java -PersonalProfileService.java -Provider.java -QueryItem.java -RemoveEntry.java -ResourceID.java -ResourceOffering.java -SWIGTYPE_p_LassoDiscoEncryptedResourceID.java -SWIGTYPE_p_LassoDiscoRequestedServiceType.java -SWIGTYPE_p_LassoDstNewData.java -SWIGTYPE_p_LassoMdProtocolType.java -SWIGTYPE_p_LassoSoapBindingProvider.java -SWIGTYPE_p_LassoSignatureType.java -SWIGTYPE_p_NodeList.java -SWIGTYPE_p_void.java -SWIGTYPE_p_xmlNode.java -SamlAdvice.java -SamlAssertion.java -SamlAttributeStatement.java -SamlAttributeValue.java -SamlAuthenticationStatement.java -SamlConditions.java -SamlNameIdentifier.java -SamlSubject.java -SamlSubjectConfirmation.java -SamlSubjectLocality.java -SamlSubjectStatement.java -SamlpRequest.java -SamlpResponse.java -SamlpStatus.java -SamlpStatusCode.java -SaCredentials.java -SaSASLRequest.java -SaSASLResponse.java -Server.java -ServiceInstance.java -Session.java -SoapBindingCorrelation.java -SoapBody.java -SoapEnvelope.java -SoapHeader.java -Status.java -StringArray.java -UserAccount.java -WsfProfile.java -WsseSecurity.java -lasso.java -lassoConstants.java -lassoJNI.java -LibRequestAuthnContext.java -NodeArray.java -SamlAttributeDesignator.java -SamlAttribute.java -SamlAudienceRestrictionCondition.java -SamlAuthorityBinding.java -SamlConditionAbstract.java -SamlpRequestAbstract.java -SamlpResponseAbstract.java -SamlStatementAbstract.java -SamlSubjectStatementAbstract.java -StringArray.java -StringList.java -NodeList.java -DiscoCredentials.java -DiscoDescription.java -DiscoEncryptedResourceID.java -DiscoInsertEntry.java -LassoHttpMethod.java -LassoLoginProtocolProfile.java -LassoMessageType.java -LassoProviderRole.java -LassoRequestType.java -LassoSignatureMethod.java -DiscoOptions.java -DiscoRemoveEntry.java -DiscoRequestedServiceType.java -DiscoResourceID.java -DiscoResourceOffering.java -DiscoServiceInstance.java -DstData.java -DstNewData.java -DstQueryItem.java -InteractionProfileService.java -IsHelp.java -IsInquiry.java -IsInquiryElement.java -IsInteractionRequest.java -IsInteractionResponse.java -IsInteractionStatement.java -IsItem.java -IsParameter.java -IsRedirectRequest.java -IsSelect.java -IsText.java -IsUserInteraction.java -ProfileService.java -UtilityStatus.java -Saml2Action.java -Saml2Advice.java -Saml2Assertion.java -Saml2Attribute.java -Saml2AttributeStatement.java -Saml2AudienceRestriction.java -Saml2AuthnContext.java -Saml2AuthnStatement.java -Saml2AuthzDecisionStatement.java -Saml2BaseIDAbstract.java -Saml2ConditionAbstract.java -Saml2Conditions.java -Saml2EncryptedElement.java -Saml2Evidence.java -Saml2KeyInfoConfirmationData.java -Saml2NameID.java -Saml2OneTimeUse.java -Saml2ProxyRestriction.java -Saml2StatementAbstract.java -Saml2SubjectConfirmationData.java -Saml2SubjectConfirmation.java -Saml2Subject.java -Saml2SubjectLocality.java diff --git a/java/Makefile.am b/java/Makefile.am deleted file mode 100644 index 10913c3c..00000000 --- a/java/Makefile.am +++ /dev/null @@ -1,231 +0,0 @@ -# Define java Package directory, the tailing '/' is mandatory. -JAVA_PATH = com/entrouvert/lasso/ -CLASSPATH = . - -javalibdir = $(prefix)/lib/java -javasharedir = $(prefix)/share/java - -# Shared library. -if MINGW -javalib_LTLIBRARIES = jlasso.la -else -javalib_LTLIBRARIES = libjlasso.la -endif - -jlasso_la_SOURCES = lasso_wrap.c -jlasso_la_CFLAGS = -fno-strict-aliasing $(JAVA_INCLUDE) $(LASSO_CORE_CFLAGS) -I$(top_builddir) -I$(top_srcdir) -jlasso_la_LIBADD = $(top_builddir)/lasso/liblasso.la $(LASSO_LIBS) -jlasso_la_LDFLAGS = -no-undefined -avoid-version -module \ - -Wl,--add-stdcall-alias - -libjlasso_la_SOURCES = lasso_wrap.c -libjlasso_la_CFLAGS = -fno-strict-aliasing $(JAVA_INCLUDE) $(LASSO_CORE_CFLAGS) -I$(top_builddir) -I$(top_srcdir) -libjlasso_la_LIBADD = $(top_builddir)/lasso/liblasso.la $(LASSO_LIBS) -libjlasso_la_LDFLAGS = -no-undefined -avoid-version -module - -javashare_DATA = lasso.jar - -SWIG_OUTPUTS = lasso_wrap.c \ - Defederation.java \ - DowncastableNode.java \ - Ecp.java \ - Federation.java \ - Identity.java \ - lasso.java \ - lassoConstants.java \ - lassoJNI.java \ - Lecp.java \ - LibAssertion.java \ - LibAuthnRequest.java \ - LibAuthnResponse.java \ - LibFederationTerminationNotification.java \ - LibLogoutRequest.java \ - LibLogoutResponse.java \ - LibRegisterNameIdentifierRequest.java \ - LibRegisterNameIdentifierResponse.java \ - LibRequestAuthnContext.java \ - LibStatusResponse.java \ - Login.java \ - Logout.java \ - MiscTextNode.java \ - NameIdentifierMapping.java \ - NameIdManagement.java \ - NameRegistration.java \ - Node.java \ - NodeList.java \ - Provider.java \ - Saml2Action.java \ - Saml2Advice.java \ - Saml2Assertion.java \ - Saml2Attribute.java \ - Saml2AttributeStatement.java \ - Saml2AttributeValue.java \ - Saml2AudienceRestriction.java \ - Saml2AuthnContext.java \ - Saml2AuthnStatement.java \ - Saml2AuthzDecisionStatement.java \ - Saml2BaseIDAbstract.java \ - Saml2ConditionAbstract.java \ - Saml2Conditions.java \ - Saml2EncryptedElement.java \ - Saml2Evidence.java \ - Saml2KeyInfoConfirmationData.java \ - Saml2NameID.java \ - Saml2OneTimeUse.java \ - Saml2ProxyRestriction.java \ - Saml2StatementAbstract.java \ - Saml2Subject.java \ - Saml2SubjectConfirmation.java \ - Saml2SubjectConfirmationData.java \ - Saml2SubjectLocality.java \ - SamlAdvice.java \ - SamlAssertion.java \ - SamlAttribute.java \ - SamlAttributeDesignator.java \ - SamlAttributeStatement.java \ - SamlAttributeValue.java \ - SamlAudienceRestrictionCondition.java \ - SamlAuthenticationStatement.java \ - SamlAuthorityBinding.java \ - SamlConditionAbstract.java \ - SamlConditions.java \ - SamlNameIdentifier.java \ - SamlStatementAbstract.java \ - SamlSubject.java \ - SamlSubjectConfirmation.java \ - SamlSubjectLocality.java \ - SamlSubjectStatement.java \ - SamlSubjectStatementAbstract.java \ - Samlp2ArtifactResolve.java \ - Samlp2ArtifactResponse.java \ - Samlp2AssertionIDRequest.java \ - Samlp2AttributeQuery.java \ - Samlp2AuthnQuery.java \ - Samlp2AuthnRequest.java \ - Samlp2AuthzDecisionQuery.java \ - Samlp2Extensions.java \ - Samlp2IDPEntry.java \ - Samlp2IDPList.java \ - Samlp2LogoutRequest.java \ - Samlp2ManageNameIDRequest.java \ - Samlp2NameIDMappingRequest.java \ - Samlp2NameIDMappingResponse.java \ - Samlp2NameIDPolicy.java \ - Samlp2RequestAbstract.java \ - Samlp2RequestedAuthnContext.java \ - Samlp2Response.java \ - Samlp2Scoping.java \ - Samlp2Status.java \ - Samlp2StatusCode.java \ - Samlp2StatusDetail.java \ - Samlp2StatusResponse.java \ - Samlp2SubjectQueryAbstract.java \ - Samlp2Terminate.java \ - SamlpRequest.java \ - SamlpRequestAbstract.java \ - SamlpResponse.java \ - SamlpResponseAbstract.java \ - SamlpStatus.java \ - SamlpStatusCode.java \ - Server.java \ - Session.java \ - StringDict.java \ - StringList.java \ - SWIGTYPE_p_GHashTable.java \ - SWIGTYPE_p_void.java - -if WSF_ENABLED -SWIG_WSF_OUTPUTS = Authentication.java \ - DataService.java \ - DiscoAuthenticateRequester.java \ - DiscoAuthenticateSessionContext.java \ - DiscoAuthorizeRequester.java \ - DiscoCredentials.java \ - DiscoDescription.java \ - DiscoEncryptedResourceID.java \ - DiscoEncryptResourceID.java \ - DiscoGenerateBearerToken.java \ - DiscoInsertEntry.java \ - DiscoModify.java \ - DiscoModifyResponse.java \ - DiscoOptions.java \ - DiscoQuery.java \ - DiscoQueryResponse.java \ - DiscoRemoveEntry.java \ - DiscoRequestedServiceType.java \ - DiscoResourceID.java \ - DiscoResourceOffering.java \ - DiscoSendSingleLogout.java \ - DiscoServiceInstance.java \ - Discovery.java \ - DstData.java \ - DstModification.java \ - DstModify.java \ - DstModifyResponse.java \ - DstNewData.java \ - DstQueryItem.java \ - DstQuery.java \ - DstQueryResponse.java \ - InteractionProfileService.java \ - IsHelp.java \ - IsInquiryElement.java \ - IsInquiry.java \ - IsInteractionRequest.java \ - IsInteractionResponse.java \ - IsInteractionStatement.java \ - IsItem.java \ - IsParameter.java \ - IsRedirectRequest.java \ - IsSelect.java \ - IsText.java \ - IsUserInteraction.java \ - lassoConstants.java \ - SaCredentials.java \ - SaSASLRequest.java \ - SaSASLResponse.java \ - SoapBindingCorrelation.java \ - SoapBody.java \ - SoapEnvelope.java \ - SoapHeader.java \ - UserAccount.java \ - UtilityStatus.java \ - WsfProfile.java \ - WsseSecurity.java -endif - -JAVA_CRUFT = $(JAVA_PATH)lasso.class lasso_wrap.o lasso.jar $(JAVA_PATH)lasso.java - -# The SWIG outputs are included in the distribution so SWIG is not -# required to use the Java interface -EXTRA_DIST = $(SWIG_OUTPUTS) $(SWIG_WSF_OUTPUTS) - -CLEANFILES = $(JAVA_CRUFT) -MAINTAINERCLEANFILES = Makefile.in $(SWIG_OUTPUTS) $(SWIG_WSF_OUTPUTS) - -SWIG_I_FILES=$(shell find $(top_srcdir)/swig/ -name '*.[ih]') -lasso_wrap.c lasso.java: $(SWIG_I_FILES) - $(SWIG) -v -java -module lasso -package com.entrouvert.lasso -o lasso_wrap.c \ - $(top_srcdir)/swig/Lasso.i - cp lasso_wrap.c lasso_wrap.c.bak - sed -e 's/} DowncastableNode;/void *fix;} DowncastableNode;/' \ - < lasso_wrap.c.bak > lasso_wrap.c - -# FIXME There must be a better way to do this with SWIG -$(JAVA_PATH)lasso.java: lasso.java - mkdir -p $(JAVA_PATH) - rm -f $(JAVA_PATH)/* - cp $(srcdir)/*.java $(JAVA_PATH) - -clean-local: - rm -f *.class - rm -rf com - -all-local: lasso.jar - -$(JAVA_PATH)lasso.class: $(JAVA_PATH)lasso.java - $(JAVAC) $(JAVAC_FLAGS) $(JAVA_PATH)*.java - -lasso.jar: $(JAVA_PATH)lasso.class - rm -f $@ - $(JAR) cf $@ $(JAVA_PATH)*.class - diff --git a/java/coldfusion/.cvsignore b/java/coldfusion/.cvsignore deleted file mode 100644 index eb5a316c..00000000 --- a/java/coldfusion/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/java/coldfusion/Makefile b/java/coldfusion/Makefile deleted file mode 100644 index 2ee70e95..00000000 --- a/java/coldfusion/Makefile +++ /dev/null @@ -1,518 +0,0 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. -# java/coldfusion/Makefile. Generated from Makefile.in by configure. - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - -srcdir = . -top_srcdir = ../.. - -pkgdatadir = $(datadir)/lasso -pkglibdir = $(libdir)/lasso -pkgincludedir = $(includedir)/lasso -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = /usr/bin/install -c -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -host_triplet = i686-pc-mingw32 -subdir = java/coldfusion -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/lasso/lasso_config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = aclocal -AMDEP_FALSE = # -AMDEP_TRUE = -AMTAR = ${SHELL} /home/eo/lasso/missing --run tar -AR = ar -AS = as -AUTOCONF = autoconf -AUTOHEADER = ${SHELL} /home/eo/lasso/missing --run autoheader -AUTOMAKE = automake -AWK = gawk -CC = gcc -mno-cygwin -CCDEPMODE = depmode=gcc3 -CFLAGS = -D_MSC_VER -DIN_LASSO -DMINGW -DWIN32 -D_WIN32 -I/usr/local/include -CHECK_CFLAGS = -CHECK_LIBS = -CPP = gcc -mno-cygwin -E -CPPFLAGS = -CXX = g++ -CXXCPP = g++ -E -CXXDEPMODE = depmode=gcc3 -CXXFLAGS = -g -O2 -CYGPATH_W = cygpath -w -DEFS = -DHAVE_CONFIG_H -DEPDIR = .deps -DLLTOOL = dlltool -ECHO = echo -ECHO_C = -ECHO_N = -n -ECHO_T = -EGREP = grep -E -EXEEXT = .exe -F77 = g77 -FFLAGS = -g -O2 -GTK_DOC_CFLAGS = -GTK_DOC_LIBS = -HTML_DIR = ${datadir}/gtk-doc/html -INSTALL_DATA = ${INSTALL} -m 644 -INSTALL_PROGRAM = ${INSTALL} -INSTALL_SCRIPT = ${INSTALL} -INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s -JAR = jar -JAVA = gij -JAVAC = gcj -JAVAC_FLAGS = -C -JAVAH = gcjh -JAVAH_FLAGS = -jni -JAVA_VERSION = 3.3.1 -LASSO_APP_DEFINES = -LASSO_CFLAGS = -I${prefix}/include/lasso -DXMLSEC_CRYPTO=\"openssl\" -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_LIBXML_260=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_XKMS=1 -DXMLSEC_CRYPTO_OPENSSL=1 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include/xmlsec -LASSO_CORE_CFLAGS = -I${prefix}/include/lasso -LASSO_CORE_LIBS = -llasso-0 -LASSO_DEFINES = -LASSO_DOCDIR = $(datadir)/doc/lasso -LASSO_LIBS = -L${exec_prefix}/lib -L/usr/local/lib -lgobject-2.0-0 -lglib-2.0-0 -lintl -lxmlsec-openssl -lxmlsec -lxslt -lxml2 -lz -liconv -LASSO_STATIC_BINARIES = -LASSO_VERSION_INFO = 0:0:0 -LDFLAGS = -L/usr/local/lib -LIBOBJS = -LIBS = -LIBTOOL = $(SHELL) $(top_builddir)/libtool -LIBTOOL_DEPS = ./ltmain.sh -LN_S = ln -s -LTLIBOBJS = -MAINT = # -MAINTAINER_MODE_FALSE = -MAINTAINER_MODE_TRUE = # -MAKEINFO = ${SHELL} /home/eo/lasso/missing --run makeinfo -MINGW_FALSE = # -MINGW_TRUE = -OBJDUMP = objdump -OBJEXT = o -PACKAGE = lasso -PACKAGE_BUGREPORT = lasso-devel@lists.labs.libre-entreprise.org -PACKAGE_NAME = Liberty Alliance Single Sign On -PACKAGE_STRING = Liberty Alliance Single Sign On 0.3.0 -PACKAGE_TARNAME = liberty-alliance-single-sign-on -PACKAGE_VERSION = 0.3.0 -PATH_SEPARATOR = : -PKG_CONFIG = pkg-config -PYTHON = python -PYTHON_VERSION = 2.3 -RANLIB = ranlib -RC = windres -SD_LANG = java -SET_MAKE = -SHELL = /bin/bash -STRIP = strip -SWIG = swig -SWIG_PYTHON_ARGS = -noproxy -TAR = tar -U = -VERSION = 0.3.0 -WITH_PYTHON_FALSE = -WITH_PYTHON_TRUE = # -WITH_TESTS_FALSE = -WITH_TESTS_TRUE = # -ac_ct_AR = ar -ac_ct_AS = as -ac_ct_CC = -ac_ct_CXX = g++ -ac_ct_DLLTOOL = dlltool -ac_ct_F77 = g77 -ac_ct_OBJDUMP = objdump -ac_ct_RANLIB = ranlib -ac_ct_RC = windres -ac_ct_STRIP = strip -am__fastdepCC_FALSE = # -am__fastdepCC_TRUE = -am__fastdepCXX_FALSE = # -am__fastdepCXX_TRUE = -am__include = include -am__leading_dot = . -am__quote = -bindir = ${exec_prefix}/bin -build = i686-pc-cygwin -build_alias = -build_cpu = i686 -build_os = cygwin -build_vendor = pc -datadir = ${prefix}/share -exec_prefix = ${prefix} -host = i686-pc-mingw32 -host_alias = i686-pc-mingw32 -host_cpu = i686 -host_os = mingw32 -host_vendor = pc -includedir = ${prefix}/include -infodir = ${prefix}/info -install_sh = /home/eo/lasso/install-sh -libdir = ${exec_prefix}/lib -libexecdir = ${exec_prefix}/libexec -localstatedir = ${prefix}/var -mandir = ${prefix}/man -mkdir_p = mkdir -p -- . -oldincludedir = /usr/include -prefix = /usr/local -program_transform_name = s,x,x, -sbindir = ${exec_prefix}/sbin -sharedstatedir = ${prefix}/com -sysconfdir = ${prefix}/etc -target_alias = -NULL = -SUBDIRS = -TARGET = target - -#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_SOURCE = ${wildcard ${JAVA_SOURCE_DIR}/*.java} -JAVA_CLASSES = ${basename ${notdir ${JAVA_SOURCE}}} -LASSO_JAR = ${TARGET}/CFLasso.jar -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/coldfusion/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu java/coldfusion/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: # $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): # $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @set fnord $$MAKEFLAGS; amf=$$2; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || mkdir "$(distdir)/$$subdir" \ - || exit 1; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="../$(top_distdir)" \ - distdir="../$(distdir)/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-recursive - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-info-am - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ - clean clean-generic clean-libtool clean-recursive ctags \ - ctags-recursive distclean distclean-generic distclean-libtool \ - distclean-recursive distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-generic mostlyclean-libtool \ - mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-info-am - - -.PHONY: clean all binary-java - -all: binary-java - -binary-java: - mkdir -p ${JAVA_BUILD_DIR} - ${JAVAC} -classpath ../target/lasso.jar -d ${JAVA_BUILD_DIR} ${JAVA_SOURCE} - ${JAR} cf ${LASSO_JAR} -C ${JAVA_BUILD_DIR} CFLasso.class - -clean: - rm -rf ${TARGET} *~ *.log -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/java/coldfusion/src/CFLassoSingleLogout.java b/java/coldfusion/src/CFLassoSingleLogout.java deleted file mode 100644 index a2bea08b..00000000 --- a/java/coldfusion/src/CFLassoSingleLogout.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * ColdFusionLasso -- ColdFusion bindings for Lasso library - * - * Copyright (C) 2004-2007 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: See AUTHORS file in top-level directory. - * - * 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 - */ - - -import com.entrouvert.lasso.Identity; -import com.entrouvert.lasso.lassoConstants; -import com.entrouvert.lasso.lasso; -import com.entrouvert.lasso.Logout; -import com.entrouvert.lasso.SamlNameIdentifier; -import com.entrouvert.lasso.Server; -import com.entrouvert.lasso.Session; - - -public class CFLassoSingleLogout { - /* A simple service provider single logout */ - - protected Logout logout = null; - protected Server server = null; - - public String idpProviderId = null; - - public void buildRequestMsg() { - logout.buildRequestMsg(); - } - - public void configure(String metadataPath, String privateKeyPath, String idpProviderId, - String idpMetadataPath, String idpPublicKeyPath) { - server = new Server(metadataPath, privateKeyPath, null, null); - this.idpProviderId = idpProviderId; - server.addProvider(lasso.PROVIDER_ROLE_IDP, idpMetadataPath, idpPublicKeyPath, null); - logout = new Logout(server); - } - - public String getIdentityDump() { - Identity identity = logout.getIdentity(); - if (identity != null) - return identity.dump(); - else - return null; - } - - public String getMsgBody() { - return logout.getMsgBody(); - } - - public String getMsgUrl() { - return logout.getMsgUrl(); - } - - public String getNameIdentifier() { - SamlNameIdentifier nameIdentifier = logout.getNameIdentifier(); - if (nameIdentifier == null) - return null; - else - return nameIdentifier.getContent(); - } - - public String getSessionDump() { - Session session = logout.getSession(); - if (session != null) - return session.dump(); - else - return null; - } - - public void initRequest() { - logout.initRequest(idpProviderId, lassoConstants.HTTP_METHOD_ANY); - } - - public void processResponseMsg(String responseMsg) { - logout.processResponseMsg(responseMsg); - } - - public void setIdentityFromDump(String identityDump) { - logout.setIdentityFromDump(identityDump); - } - - public void setSessionFromDump(String sessionDump) { - logout.setSessionFromDump(sessionDump); - } -} diff --git a/java/coldfusion/src/CFLassoSingleSignOn.java b/java/coldfusion/src/CFLassoSingleSignOn.java deleted file mode 100644 index 1f161305..00000000 --- a/java/coldfusion/src/CFLassoSingleSignOn.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * ColdFusionLasso -- ColdFusion bindings for Lasso library - * - * Copyright (C) 2004-2007 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: See AUTHORS file in top-level directory. - * - * 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 - */ - - -/* - * Simple wrapper for JLasso, to ease its use by ColdFusion applications. - * - * To compile it: - * $ javac -classpath ../../lasso.jar *.java - * - * To test it: - * $ export LD_LIBRARY_PATH=../../.libs/ - * $ java -classpath ../../lasso.jar:. CFLassoSingleSignOn - - * - * To use it: - * $ jar cf CFLasso.jar *.class - * edit ColdFusion file bin/jvm.config: - * - Add libjlasso.so directory to java.library.path variable. - * - Add lasso.jar & CFLasso.jar to java.class.path variable. - */ - -import com.entrouvert.lasso.LibAuthnRequest; -import com.entrouvert.lasso.Identity; -import com.entrouvert.lasso.lassoConstants; -import com.entrouvert.lasso.lasso; -import com.entrouvert.lasso.Login; -import com.entrouvert.lasso.SamlNameIdentifier; -import com.entrouvert.lasso.Server; -import com.entrouvert.lasso.Session; - - -public class CFLassoSingleSignOn { - /* A simple service provider single sign-on */ - - protected Login login = null; - protected Server server = null; - - public String idpProviderId = null; - - public void acceptSso() { - login.acceptSso(); - } - - public void buildAuthnRequestMsg() { - login.buildAuthnRequestMsg(); - } - - public void buildRequestMsg() { - login.buildRequestMsg(); - } - - public void configure(String metadataPath, String privateKeyPath, String idpProviderId, - String idpMetadataPath, String idpPublicKeyPath) { - server = new Server(metadataPath, privateKeyPath, null, null); - this.idpProviderId = idpProviderId; - server.addProvider(lasso.PROVIDER_ROLE_IDP, idpMetadataPath, idpPublicKeyPath, null); - login = new Login(server); - } - - public String getIdentityDump() { - Identity identity = login.getIdentity(); - if (identity != null) - return identity.dump(); - else - return null; - } - - public String getMsgBody() { - return login.getMsgBody(); - } - - public String getMsgRelayState() { - return login.getMsgRelayState(); - } - - public String getMsgUrl() { - return login.getMsgUrl(); - } - - public String getNameIdentifier() { - SamlNameIdentifier nameIdentifier = login.getNameIdentifier(); - if (nameIdentifier == null) - return null; - else - return nameIdentifier.getContent(); - } - - public String getSessionDump() { - Session session = login.getSession(); - if (session != null) - return session.dump(); - else - return null; - } - - public void initAuthnRequest(String relayState) { - LibAuthnRequest authnRequest; - String authnRequestUrl; - - login.initAuthnRequest(idpProviderId, lassoConstants.HTTP_METHOD_REDIRECT); - authnRequest = (LibAuthnRequest) login.getRequest(); - authnRequest.setIsPassive(false); - authnRequest.setNameIdPolicy(lassoConstants.LIB_NAMEID_POLICY_TYPE_FEDERATED); - authnRequest.setConsent(lassoConstants.LIB_CONSENT_OBTAINED); - if (relayState != null) - authnRequest.setRelayState(relayState); - } - - public void initRequest(String queryString) { - login.initRequest(queryString, lassoConstants.HTTP_METHOD_REDIRECT); - } - - static public void main(String [] args) { - CFLassoSingleSignOn lasso = new CFLassoSingleSignOn(); - lasso.configure("../../../tests/data/sp2-la/metadata.xml", - "../../../tests/data/sp2-la/private-key-raw.pem", - "https://idp2/metadata", - "../../../tests/data/idp2-la/metadata.xml", - "../../../tests/data/idp2-la/public-key.pem"); - lasso.initAuthnRequest("data-to-get-back"); - lasso.buildAuthnRequestMsg(); - String ssoUrl = lasso.getMsgUrl(); - System.out.println("Test"); - System.out.print("Identity provider single sign-on URL = "); - System.out.println(ssoUrl); - } - - public void processResponseMsg(String responseMsg) { - login.processResponseMsg(responseMsg); - } - - public void setIdentityFromDump(String identityDump) { - login.setIdentityFromDump(identityDump); - } - - public void setSessionFromDump(String sessionDump) { - login.setSessionFromDump(sessionDump); - } -} diff --git a/java/coldfusion/web/assertionConsumer.cfm b/java/coldfusion/web/assertionConsumer.cfm deleted file mode 100644 index d942318e..00000000 --- a/java/coldfusion/web/assertionConsumer.cfm +++ /dev/null @@ -1,48 +0,0 @@ -<html> - <head> - <title>Lasso Assertion Consumer</title> - </head> - <body> - <h1>Lasso Assertion Consumer</h1> -<!-- - <cfdump var="#QUERY_STRING#"> - <cfobject type="java" name="sys" class="java.lang.System" action="create"> - <cfset properties=sys.getProperties()> - <cfdump var="#properties#"> ---> - <cfobject action="create" type="Java" class="CFLassoSingleSignOn" name="lasso"> - <cfset lasso.init()> - <cfset lasso.configure("/opt/coldfusionmx/wwwroot/lasso/data/metadata.xml", "/opt/coldfusionmx/wwwroot/lasso/data/public-key-la.pem", "/opt/coldfusionmx/wwwroot/lasso/data/private-key-raw-la.pem", "https://idp2/metadata", "/opt/coldfusionmx/wwwroot/lasso/data/metadata-idp.xml", "/opt/coldfusionmx/wwwroot/lasso/data/idp2-la/public-key.pem")> - <cfset lasso.initRequest(#QUERY_STRING#)> - <cfset lasso.buildRequestMsg()> - <cfset soapUrl=lasso.getMsgUrl()> - <cfset soapBody=lasso.getMsgBody()> - <cfset relayState=lasso.getMsgRelayState()> -<!-- - <cfdump var="#soapUrl#"> - <cfdump var="#soapBody#"> ---> - <cfhttp method="POST" url="#soapUrl#"> - <cfhttpparam type="XML" name="body" value="#soapBody#"> - </cfhttp> -<!-- - <cfdump var="#cfhttp.statuscode#"> - <cfdump var="#cfhttp.header#"> - <cfdump var="#cfhttp.fileContent#"> ---> - <cfset lasso.processResponseMsg(#cfhttp.fileContent#)> - <cfset nameIdentifier=lasso.getNameIdentifier()> - <!-- TODO: Retrieve identity dump and session dump in your users and sessions databases, - using nameIdentifier to retrieve user and session. --> - <!-- cfset lasso.setIdentityFromDump(#identityDump#) --> - <!-- cfset lasso.setSessionFromDump(#sessionDump#) --> - <cfset lasso.acceptSso()> - <cfset identityDump=lasso.getIdentityDump()> - <cfset sessionDump=lasso.getSessionDump()> - <!-- TODO: Store identity dump and session dump into your users and sessions databases. --> - <cfoutput> - <p>User is now logged. RelayState = #relayState#</p> - </cfoutput> - </body> -</html> - diff --git a/java/coldfusion/web/singleLogout.cfm b/java/coldfusion/web/singleLogout.cfm deleted file mode 100644 index f7928250..00000000 --- a/java/coldfusion/web/singleLogout.cfm +++ /dev/null @@ -1,40 +0,0 @@ -<html> - <head> - <title>Lasso Single Logout</title> - </head> - <body> - <h1>Lasso Single Logout</h1> - <cfobject action="create" type="Java" class="CFLassoSingleLogout" name="lasso"> - <cfset lasso.init()> - <cfset lasso.configure("/opt/coldfusionmx/wwwroot/lasso/data/metadata.xml", "/opt/coldfusionmx/wwwroot/lasso/data/public-key-la.pem", "/opt/coldfusionmx/wwwroot/lasso/data/private-key-raw-la.pem", "https://idp2/metadata", "/opt/coldfusionmx/wwwroot/lasso/data/metadata-idp.xml", "/opt/coldfusionmx/wwwroot/lasso/data/idp2-la/public-key.pem")> - <!-- TODO: Retrieve identity dump and session dump in your users and sessions databases. --> - <!-- cfset lasso.setIdentityFromDump(#identityDump#) --> - <!-- cfset lasso.setSessionFromDump(#sessionDump#) --> - <cfset lasso.initRequest()> - <cfset lasso.buildRequestMsg()> - <cfset soapUrl=lasso.getMsgUrl()> - <cfset soapBody=lasso.getMsgBody()> -<!-- - <cfdump var="#soapUrl#"> - <cfdump var="#soapBody#"> ---> - <cfhttp method="POST" url="#soapUrl#"> - <cfhttpparam type="XML" name="body" value="#soapBody#"> - </cfhttp> -<!-- - <cfdump var="#cfhttp.statuscode#"> - <cfdump var="#cfhttp.header#"> - <cfdump var="#cfhttp.fileContent#"> ---> - <cfset lasso.processResponseMsg(#cfhttp.fileContent#)> - <cfset nameIdentifier=lasso.getNameIdentifier()> - <cfset identityDump=lasso.getIdentityDump()> - <cfset sessionDump=lasso.getSessionDump()> - <!-- TODO: Store identity dump in your users database and remove session dump from sessions - database. --> - <cfoutput> - <p>User is now unlogged.</p> - </cfoutput> - </body> -</html> - diff --git a/java/coldfusion/web/singleSignOn.cfm b/java/coldfusion/web/singleSignOn.cfm deleted file mode 100644 index 12a3181f..00000000 --- a/java/coldfusion/web/singleSignOn.cfm +++ /dev/null @@ -1,21 +0,0 @@ -<html> - <head> - <title>Lasso Single Sign-On</title> - </head> - <body> - <h1>Lasso Single Sign-On</h1> -<!-- - <cfobject type="java" name="sys" class="java.lang.System" action="create"> - <cfset properties=sys.getProperties()> - <cfdump var="#properties#"> ---> - <cfobject action="create" type="Java" class="CFLassoSingleSignOn" name="lasso"> - <cfset lasso.init()> - <cfset lasso.configure("/opt/coldfusionmx/wwwroot/lasso/data/metadata.xml", "/opt/coldfusionmx/wwwroot/lasso/data/public-key-la.pem", "/opt/coldfusionmx/wwwroot/lasso/data/private-key-raw-la.pem", "https://idp2/metadata", "/opt/coldfusionmx/wwwroot/lasso/data/metadata-idp.xml", "/opt/coldfusionmx/wwwroot/lasso/data/idp2-la/public-key.pem")> - <cfset lasso.initAuthnRequest("important-string")> - <cfset lasso.buildAuthnRequestMsg()> - <cfset ssoUrl=lasso.getMsgUrl()> - <cfoutput><p>Identity provider single sing-on URL to redirect to = #ssoUrl#</p></cfoutput> - <cflocation url=#ssoUrl#> - </body> -</html> diff --git a/java/doc/ImplantationMapping.rst b/java/doc/ImplantationMapping.rst deleted file mode 100644 index 92b39f65..00000000 --- a/java/doc/ImplantationMapping.rst +++ /dev/null @@ -1,37 +0,0 @@ -============================ -Implantation du mapping Java -============================ - -:author: Benjamin Poussin <poussin@codelutin.com> - -La même hierarchie d'objet à été faite dans la mesure du possible entre -l'implantation C et Java. - -Conservation de l'objet C associé à l'objet Java -================================================ - -Chaque objet Java hérite d'un objet LassoNode qui contient un champs -*long c_lasso_object* qui permet de stocker la référence du pointer de -l'objet C associé à cet objet Java. - -Destruction des objets -====================== - -L'objet LassoNode contient aussi une méthode finalize qui permet l'appel au -destructeur de l'objet C, lorsque l'objet java est libéré. - -Si une méthode destroy particulière doit-être utilisé pour un objet C, il -suffit dans l'objet Java de redéfinir la méthode -*native protected void destroy();* et de l'implanter différement dans -l'implantation C de la méthode native. - -Acces au attribut des objets C -============================== - -Chaque attribut des objets C est accessible par une méthode d'acces. Cette -méthode se charge de demander la construction de l'objet de représentation -Java du champs. Ceci est fait par une méthode *init<FieldName>Field*. Cette -méthode ne modifie l'attribut que si l'objet C et l'objet Java ne sont plus -synchronisé, c'est à dire si la valeur dans l'objet C à été modifié ou que -l'objet Java la représentant n'a jamais été créer. - diff --git a/java/doc/JNIForDummy.rst b/java/doc/JNIForDummy.rst deleted file mode 100644 index 4f8cd315..00000000 --- a/java/doc/JNIForDummy.rst +++ /dev/null @@ -1,36 +0,0 @@ -================ -JNI for dummy :) -================ - -Sous Linux le nom de la librairie compilée doit obligatoirement commencer par **lib** et -finir par **.so**. - -Pour charger à l'éxécution la librairie elle doit-être dans le -LD_LIBRAIRY_PATH et en Java il faut la charger avec **System.loadLibrary**:: - -Par exemple si vous avec généré la librairie libjlasso.so, on la chargera -avec:: - - System.loadLibrary("jlasso"); - -Pour connaitre le nom de la librairie que le système attend, on peut -utiliser:: - - System.out.println(System.mapLibraryName("jlasso")); - -Comment ajouter des fonctions JNI -================================= - -:ref: http://java.sun.com/docs/books/jni/html/jniTOC.html -:ref: http://gbm.esil.univ-mrs.fr/~tourai/Java/node48.html - -Il faut créer les classes Java, et marquer les méthodes qui doivent être -écrite en C, avec le mot cle native. Ces méthodes n'ont pas de corps en -Java. - -Il faut ensuite exécuter le Makefile se trouvant dans lasso/java pour qu'il -génère les fichiers d'entête JNI. - -Il ne reste plus qu'a reprendre la signature de la méthode et de la coder -dans le .c - diff --git a/java/tests/.cvsignore b/java/tests/.cvsignore deleted file mode 100644 index 6b468b62..00000000 --- a/java/tests/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.class diff --git a/java/tests/BindingTests.java b/java/tests/BindingTests.java deleted file mode 100644 index ae9c9e6f..00000000 --- a/java/tests/BindingTests.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * $Id$ - * - * Java unit tests for Lasso library - * - * Copyright (C) 2004-2007 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: See AUTHORS file in top-level directory. - * - * 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=../ -// $ javac -classpath /usr/share/java/junit.jar:../lasso.jar:. BindingTests.java -// $ java -classpath /usr/share/java/junit.jar:../lasso.jar:. BindingTests -// or for gcj: -// $ export LD_LIBRARY_PATH=../ -// $ gcj -C -classpath /usr/share/java/junit.jar:../lasso.jar:. BindingTests.java -// $ gij -classpath /usr/share/java/junit.jar:../lasso.jar:. BindingTests - - -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - -import com.entrouvert.lasso.*; - - -public class BindingTests extends TestCase { - public static void main(String args[]) { - junit.textui.TestRunner.run(suite()); - } - - public static Test suite() { - return new TestSuite(BindingTests.class); - } - - public void test01() { - // Create and delete nodes. - - LibAuthnRequest authnRequest = new LibAuthnRequest(); - authnRequest = null; - } - - public void test02() { - // Get & set simple attributes of nodes. - - LibAuthnRequest authnRequest = new LibAuthnRequest(); - - // Test a string attribute. - assertNull(authnRequest.getConsent()); - authnRequest.setConsent(lasso.LIB_CONSENT_OBTAINED); - assertEquals(authnRequest.getConsent(), lasso.LIB_CONSENT_OBTAINED); - authnRequest.setConsent(null); - assertNull(authnRequest.getConsent()); - - // Test a renamed string attribute. - assertNull(authnRequest.getRelayState()); - authnRequest.setRelayState("Hello World!"); - assertEquals(authnRequest.getRelayState(), "Hello World!"); - authnRequest.setRelayState(null); - assertNull(authnRequest.getRelayState()); - - // Test an integer attribute. - assertEquals(authnRequest.getMajorVersion(), 0); - authnRequest.setMajorVersion(314); - assertEquals(authnRequest.getMajorVersion(), 314); - - authnRequest = null; - } - - public void test03() { - // Get & set attributes of nodes of type string list. - - LibAuthnRequest authnRequest = new LibAuthnRequest(); - - assertNull(authnRequest.getRespondWith()); - - StringList respondWith = new StringList(); - assertEquals(respondWith.length(), 0); - respondWith.append("first string"); - assertEquals(respondWith.length(), 1); - assertEquals(respondWith.getItem(0), "first string"); - assertEquals(respondWith.getItem(0), "first string"); - respondWith.append("second string"); - assertEquals(respondWith.length(), 2); - assertEquals(respondWith.getItem(0), "first string"); - assertEquals(respondWith.getItem(1), "second string"); - respondWith.append("third string"); - assertEquals(respondWith.length(), 3); - assertEquals(respondWith.getItem(0), "first string"); - assertEquals(respondWith.getItem(1), "second string"); - assertEquals(respondWith.getItem(2), "third string"); - authnRequest.setRespondWith(respondWith); - assertEquals(authnRequest.getRespondWith().getItem(0), "first string"); - assertEquals(authnRequest.getRespondWith().getItem(1), "second string"); - assertEquals(authnRequest.getRespondWith().getItem(2), "third string"); - assertEquals(respondWith.getItem(0), "first string"); - assertEquals(respondWith.getItem(1), "second string"); - assertEquals(respondWith.getItem(2), "third string"); - respondWith = null; - assertEquals(authnRequest.getRespondWith().getItem(0), "first string"); - assertEquals(authnRequest.getRespondWith().getItem(1), "second string"); - assertEquals(authnRequest.getRespondWith().getItem(2), "third string"); - respondWith = authnRequest.getRespondWith(); - assertEquals(respondWith.getItem(0), "first string"); - assertEquals(respondWith.getItem(1), "second string"); - assertEquals(respondWith.getItem(2), "third string"); - respondWith = null; - assertEquals(authnRequest.getRespondWith().getItem(0), "first string"); - assertEquals(authnRequest.getRespondWith().getItem(1), "second string"); - assertEquals(authnRequest.getRespondWith().getItem(2), "third string"); - authnRequest.setRespondWith(null); - assertNull(authnRequest.getRespondWith()); - - authnRequest = null; - } - - public void test04() { - // Get & set attributes of nodes of type node list. - - SamlpResponse response = new SamlpResponse(); - - assertNull(response.getAssertion()); - - NodeList assertions = new NodeList(); - assertEquals(assertions.length(), 0); - SamlAssertion assertion1 = new SamlAssertion(); - assertion1.setAssertionId("assertion 1"); - assertions.append(assertion1); - assertEquals(assertions.length(), 1); - assertEquals(((SamlAssertion) assertions.getItem(0)).getAssertionId(), "assertion 1"); - assertEquals(((SamlAssertion) assertions.getItem(0)).getAssertionId(), "assertion 1"); - SamlAssertion assertion2 = new SamlAssertion(); - assertion2.setAssertionId("assertion 2"); - assertions.append(assertion2); - assertEquals(assertions.length(), 2); - assertEquals(((SamlAssertion) assertions.getItem(0)).getAssertionId(), "assertion 1"); - assertEquals(((SamlAssertion) assertions.getItem(1)).getAssertionId(), "assertion 2"); - SamlAssertion assertion3 = new SamlAssertion(); - assertion3.setAssertionId("assertion 3"); - assertions.append(assertion3); - assertEquals(assertions.length(), 3); - assertEquals(((SamlAssertion) assertions.getItem(0)).getAssertionId(), "assertion 1"); - assertEquals(((SamlAssertion) assertions.getItem(1)).getAssertionId(), "assertion 2"); - assertEquals(((SamlAssertion) assertions.getItem(2)).getAssertionId(), "assertion 3"); - response.setAssertion(assertions); - assertEquals(((SamlAssertion) response.getAssertion().getItem(0)).getAssertionId(), - "assertion 1"); - assertEquals(((SamlAssertion) response.getAssertion().getItem(1)).getAssertionId(), - "assertion 2"); - assertEquals(((SamlAssertion) response.getAssertion().getItem(2)).getAssertionId(), - "assertion 3"); - assertEquals(((SamlAssertion) assertions.getItem(0)).getAssertionId(), "assertion 1"); - assertEquals(((SamlAssertion) assertions.getItem(1)).getAssertionId(), "assertion 2"); - assertEquals(((SamlAssertion) assertions.getItem(2)).getAssertionId(), "assertion 3"); - assertions = null;; - assertEquals(((SamlAssertion) response.getAssertion().getItem(0)).getAssertionId(), - "assertion 1"); - assertEquals(((SamlAssertion) response.getAssertion().getItem(1)).getAssertionId(), - "assertion 2"); - assertEquals(((SamlAssertion) response.getAssertion().getItem(2)).getAssertionId(), - "assertion 3"); - assertions = response.getAssertion(); - assertEquals(((SamlAssertion) assertions.getItem(0)).getAssertionId(), "assertion 1"); - assertEquals(((SamlAssertion) assertions.getItem(1)).getAssertionId(), "assertion 2"); - assertEquals(((SamlAssertion) assertions.getItem(2)).getAssertionId(), "assertion 3"); - assertions = null; - assertEquals(((SamlAssertion) response.getAssertion().getItem(0)).getAssertionId(), - "assertion 1"); - assertEquals(((SamlAssertion) response.getAssertion().getItem(1)).getAssertionId(), - "assertion 2"); - assertEquals(((SamlAssertion) response.getAssertion().getItem(2)).getAssertionId(), - "assertion 3"); - response.setAssertion(null); - assertNull(response.getAssertion()); - - response = null; - } - - public void test05() { - // Get & set attributes of nodes of type XML list. - - LibAuthnRequest authnRequest = new LibAuthnRequest(); - - assertNull(authnRequest.getExtension()); - - String actionString1 = "<lib:Extension xmlns:lib=\"urn:liberty:iff:2003-08\">\n" - + " <action>do 1</action>\n" - + "</lib:Extension>"; - String actionString2 = "<lib:Extension xmlns:lib=\"urn:liberty:iff:2003-08\">\n" - + " <action>do 2</action>\n" - + "</lib:Extension>"; - String actionString3 = "<lib:Extension xmlns:lib=\"urn:liberty:iff:2003-08\">\n" - + " <action>do 3</action>\n" - + "</lib:Extension>"; - StringList extension = new StringList(); - assertEquals(extension.length(), 0); - extension.append(actionString1); - assertEquals(extension.length(), 1); - assertEquals(extension.getItem(0), actionString1); - assertEquals(extension.getItem(0), actionString1); - extension.append(actionString2); - assertEquals(extension.length(), 2); - assertEquals(extension.getItem(0), actionString1); - assertEquals(extension.getItem(1), actionString2); - extension.append(actionString3); - assertEquals(extension.length(), 3); - assertEquals(extension.getItem(0), actionString1); - assertEquals(extension.getItem(1), actionString2); - assertEquals(extension.getItem(2), actionString3); - authnRequest.setExtension(extension); - assertEquals(authnRequest.getExtension().getItem(0), actionString1); - assertEquals(authnRequest.getExtension().getItem(1), actionString2); - assertEquals(authnRequest.getExtension().getItem(2), actionString3); - assertEquals(extension.getItem(0), actionString1); - assertEquals(extension.getItem(1), actionString2); - assertEquals(extension.getItem(2), actionString3); - extension = null; - assertEquals(authnRequest.getExtension().getItem(0), actionString1); - assertEquals(authnRequest.getExtension().getItem(1), actionString2); - assertEquals(authnRequest.getExtension().getItem(2), actionString3); - extension = authnRequest.getExtension(); - assertEquals(extension.getItem(0), actionString1); - assertEquals(extension.getItem(1), actionString2); - assertEquals(extension.getItem(2), actionString3); - extension = null; - assertEquals(authnRequest.getExtension().getItem(0), actionString1); - assertEquals(authnRequest.getExtension().getItem(1), actionString2); - assertEquals(authnRequest.getExtension().getItem(2), actionString3); - authnRequest.setExtension(null); - assertNull(authnRequest.getExtension()); - - authnRequest = null; - } - - public void test06() { - // Get & set attributes of nodes of type node. - - Login login = new Login(new Server(null, null, null, null)); - - assertNull(login.getRequest()); - login.setRequest((SamlpRequestAbstract) new LibAuthnRequest()); - ((LibAuthnRequest) login.getRequest()).setConsent(lasso.LIB_CONSENT_OBTAINED); - assertEquals(((LibAuthnRequest) login.getRequest()).getConsent(), - lasso.LIB_CONSENT_OBTAINED); - login.setRequest(null); - assertNull(login.getRequest()); - - login = null; - } -} diff --git a/java/tests/LoginTest.java b/java/tests/LoginTest.java deleted file mode 100644 index 5cd93f54..00000000 --- a/java/tests/LoginTest.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * $Id$ - * - * Java unit tests for Lasso library - * - * Copyright (C) 2004-2007 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: See AUTHORS file in top-level directory. - * - * 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=../ -// $ javac -classpath /usr/share/java/junit.jar:../lasso.jar:. LoginTest.java -// $ java -classpath /usr/share/java/junit.jar:../lasso.jar:. LoginTest -// or for gcj: -// $ export LD_LIBRARY_PATH=../ -// $ gcj -C -classpath /usr/share/java/junit.jar:../lasso.jar:. LoginTest.java -// $ gij -classpath /usr/share/java/junit.jar:../lasso.jar:. LoginTest - - -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - -import com.entrouvert.lasso.*; - -public class LoginTest extends TestCase { - public String generateIdentityProviderDump() { - Server server = new Server( - "../../tests/data/idp1-la/metadata.xml", - "../../tests/data/idp1-la/private-key-raw.pem", - null, - "../../tests/data/idp1-la/certificate.pem"); - server.addProvider( - lasso.PROVIDER_ROLE_SP, - "../../tests/data/sp1-la/metadata.xml", - "../../tests/data/sp1-la/public-key.pem", - "../../tests/data/ca1-la/certificate.pem"); - String serverDump = server.dump(); - return serverDump; - } - - public String generateServiceProviderDump() { - Server server = new Server( - "../../tests/data/sp1-la/metadata.xml", - "../../tests/data/sp1-la/private-key-raw.pem", - null, - "../../tests/data/sp1-la/certificate.pem"); - server.addProvider( - lasso.PROVIDER_ROLE_IDP, - "../../tests/data/idp1-la/metadata.xml", - "../../tests/data/idp1-la/public-key.pem", - "../../tests/data/ca1-la/certificate.pem"); - String serverDump = server.dump(); - return serverDump; - } - - public void test01_generateServersDumps() { - String identityProviderDump = generateIdentityProviderDump(); - assertNotNull(identityProviderDump); - String serviceProviderDump = generateServiceProviderDump(); - assertNotNull(serviceProviderDump); - } - - public void test02_serviceProviderLogin() { - boolean userAuthenticated, userConsentObtained; - int method, requestType; - LibAuthnRequest authnRequest; - Identity idpIdentity, spIdentity; - Login idpLogin, spLogin; - Logout idpLogout, spLogout; - SamlAssertion assertion; - Server idp, sp; - Session spSession; - String artifact, authenticationMethod, authnRequestQuery, authnRequestUrl, idpDump, - idpIdentityDump, idpRemoteProviderId, idpSessionDump, nameIdentifier, relayState, - responseQuery, responseUrl, soapEndpoint, soapResponseMsg, soapRequestMsg, - spDump, spIdentityDump, spSessionDump; - - // Service provider login using HTTP redirect. - spDump = generateServiceProviderDump(); - assertNotNull(spDump); - sp = Server.newFromDump(spDump); - spLogin = new Login(sp); - spLogin.initAuthnRequest("https://idp1/metadata", lasso.HTTP_METHOD_REDIRECT); - authnRequest = (LibAuthnRequest) spLogin.getRequest(); - authnRequest.setIsPassive(false); - authnRequest.setNameIdPolicy(lasso.LIB_NAMEID_POLICY_TYPE_FEDERATED); - authnRequest.setConsent(lasso.LIB_CONSENT_OBTAINED); - relayState = "fake"; - authnRequest.setRelayState(relayState); - spLogin.buildAuthnRequestMsg(); - authnRequestUrl = spLogin.getMsgUrl(); - authnRequestQuery = authnRequestUrl.substring(authnRequestUrl.indexOf("?") + 1); - - // Identity provider singleSignOn, for a user having no federation. - idpDump = generateIdentityProviderDump(); - assertNotNull(idpDump); - idp = Server.newFromDump(idpDump); - idpLogin = new Login(idp); - idpLogin.processAuthnRequestMsg(authnRequestQuery); - assertTrue(idpLogin.mustAuthenticate()); - assertFalse(idpLogin.mustAskForConsent()); - - userAuthenticated = true; - userConsentObtained = false; - idpLogin.validateRequestMsg(userAuthenticated, userConsentObtained); - authenticationMethod = lasso.SAML_AUTHENTICATION_METHOD_PASSWORD; - idpLogin.buildAssertion( - authenticationMethod, - null, // authenticationInstant - null, // reauthenticateOnOrAfter - null, // notBefore - null);// notOnOrAfter - assertEquals(lasso.LOGIN_PROTOCOL_PROFILE_BRWS_ART, idpLogin.getProtocolProfile()); - idpLogin.buildArtifactMsg(lasso.HTTP_METHOD_REDIRECT); - idpIdentityDump = idpLogin.getIdentity().dump(); - assertNotNull(idpIdentityDump); - idpSessionDump = idpLogin.getSession().dump(); - assertNotNull(idpSessionDump); - responseUrl = idpLogin.getMsgUrl(); - responseQuery = responseUrl.substring(responseUrl.indexOf("?") + 1); - idpRemoteProviderId = idpLogin.getRemoteProviderId(); - nameIdentifier = ((SamlNameIdentifier)idpLogin.getNameIdentifier()).getContent(); - artifact = idpLogin.getAssertionArtifact(); - assertNotNull(artifact); - method = lasso.HTTP_METHOD_REDIRECT; - - // Service provider assertion consumer. - spDump = generateServiceProviderDump(); - assertNotNull(spDump); - sp = Server.newFromDump(spDump); - spLogin = new Login(sp); - spLogin.initRequest(responseQuery, method); - spLogin.buildRequestMsg(); - soapEndpoint = spLogin.getMsgUrl(); - assertNotNull(soapEndpoint); - soapRequestMsg = spLogin.getMsgBody(); - assertNotNull(soapRequestMsg); - - // Identity provider SOAP endpoint. - requestType = lasso.getRequestTypeFromSoapMsg(soapRequestMsg); - assertEquals(lasso.REQUEST_TYPE_LOGIN, requestType); - idpDump = generateIdentityProviderDump(); - assertNotNull(idpDump); - idp = Server.newFromDump(idpDump); - idpLogin = new Login(idp); - idpLogin.processRequestMsg(soapRequestMsg); - assertEquals(artifact, idpLogin.getAssertionArtifact()); - assertNotNull(idpSessionDump); - idpLogin.setSessionFromDump(idpSessionDump); - idpLogin.buildResponseMsg(idpRemoteProviderId); - soapResponseMsg = idpLogin.getMsgBody(); - assertNotNull(soapResponseMsg); - - // Service provider assertion consumer (step 2: process SOAP response). - spLogin.processResponseMsg(soapResponseMsg); - assertEquals(nameIdentifier, ((SamlNameIdentifier)spLogin.getNameIdentifier()).getContent()); - // The user doesn't have any federation yet. - spLogin.acceptSso(); - spIdentity = spLogin.getIdentity(); - assertNotNull(spIdentity); - spIdentityDump = spIdentity.dump(); - assertNotNull(spIdentityDump); - spSession = spLogin.getSession(); - assertNotNull(spSession); - spSessionDump = spSession.dump(); - assertNotNull(spSessionDump); - assertion = (SamlAssertion) spSession.getAssertions("https://idp1/metadata").getItem(0); - authenticationMethod = assertion.getAuthenticationStatement().getAuthenticationMethod(); - assertEquals(lasso.SAML_AUTHENTICATION_METHOD_PASSWORD, authenticationMethod); - - // Service provider logout. - spDump = generateServiceProviderDump(); - assertNotNull(spDump); - sp = Server.newFromDump(spDump); - assertNotNull(sp); - spLogout = new Logout(sp); - assertNotNull(spIdentityDump); - spLogout.setIdentityFromDump(spIdentityDump); - assertNotNull(spSessionDump); - spLogout.setSessionFromDump(spSessionDump); - spLogout.initRequest(null, lasso.HTTP_METHOD_ANY); - spLogout.buildRequestMsg(); - soapEndpoint = spLogout.getMsgUrl(); - soapRequestMsg = spLogout.getMsgBody(); - - // Identity provider SOAP endpoint. - requestType = lasso.getRequestTypeFromSoapMsg(soapRequestMsg); - assertEquals(lasso.REQUEST_TYPE_LOGOUT, requestType); - idpDump = generateIdentityProviderDump(); - assertNotNull(idpDump); - idp = Server.newFromDump(idpDump); - assertNotNull(idp); - idpLogout = new Logout(idp); - idpLogout.processRequestMsg(soapRequestMsg); - assertEquals(nameIdentifier, ((SamlNameIdentifier)idpLogout.getNameIdentifier()).getContent()); - assertNotNull(idpIdentityDump); - idpLogout.setIdentityFromDump(idpIdentityDump); - assertNotNull(idpSessionDump); - idpLogout.setSessionFromDump(idpSessionDump); - idpLogout.validateRequest(); - idpIdentity = idpLogout.getIdentity(); - assertNotNull(idpIdentity); - idpIdentityDump = idpIdentity.dump(); - assertNotNull(idpIdentityDump); - // There is no other service provider from which the user must be logged out. - assertEquals(null, idpLogout.getNextProviderId()); - idpLogout.buildResponseMsg(); - soapResponseMsg = idpLogout.getMsgBody(); - - // Service provider logout (step 2: process SOAP response). - spLogout.processResponseMsg(soapResponseMsg); - spIdentityDump = spLogout.getIdentity().dump(); - assertNotNull(spIdentityDump); - } - - public static Test suite() { - return new TestSuite(LoginTest.class); - } - - public static void main(String args[]) { - System.out.println(System.mapLibraryName("jlasso")); - lasso.init(); - junit.textui.TestRunner.run(suite()); - lasso.shutdown(); - } -} - |
