summaryrefslogtreecommitdiffstats
path: root/csharp
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2008-05-27 15:27:36 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2008-05-27 15:27:36 +0000
commitcab19f5814c43ade1bcac7a9ab4c29c83a6cf35d (patch)
tree6b0fb2d318c3a2fd4421956fc85dd0f1c5c7f39e /csharp
parent1d35f289a88f2e1acfa0a8b975e40f3b95ff4c7c (diff)
downloadlasso-cab19f5814c43ade1bcac7a9ab4c29c83a6cf35d.tar.gz
lasso-cab19f5814c43ade1bcac7a9ab4c29c83a6cf35d.tar.xz
lasso-cab19f5814c43ade1bcac7a9ab4c29c83a6cf35d.zip
remove obsolete swig binding csharp, php5, python.
java stays as long as alain coetmeur needs it php(4) will be superseded by the new bindings/php4 later.
Diffstat (limited to 'csharp')
-rw-r--r--csharp/.cvsignore132
-rw-r--r--csharp/AssemblyInfo.cs6
-rw-r--r--csharp/Makefile.am130
-rw-r--r--csharp/examples/perfs.cs36
-rw-r--r--csharp/examples/runme.cs27
-rw-r--r--csharp/lasso-sharp.pc.in8
-rw-r--r--csharp/lasso-sharp.snkbin596 -> 0 bytes
-rw-r--r--csharp/lasso.dll.config3
-rw-r--r--csharp/tests/BindingTests.cs306
9 files changed, 0 insertions, 648 deletions
diff --git a/csharp/.cvsignore b/csharp/.cvsignore
deleted file mode 100644
index afa34808..00000000
--- a/csharp/.cvsignore
+++ /dev/null
@@ -1,132 +0,0 @@
-.libs
-.deps
-lasso.dll
-lasso-sharp.pc
-liblassosharpglue.la
-liblassosharpglue_la-Lasso.lo
-liblassosharpglue_la-liblassosharpglue_wrap.lo
-liblassosharpglue_wrap.c
-Makefile
-Makefile.in
-Credentials.cs
-Defederation.cs
-Description.cs
-DiscoModify.cs
-DiscoModifyResponse.cs
-DiscoQuery.cs
-DiscoQueryResponse.cs
-Discovery.cs
-DstModification.cs
-DstModify.cs
-DstModifyResponse.cs
-DstQuery.cs
-DstQueryResponse.cs
-Federation.cs
-Identity.cs
-InsertEntry.cs
-LassoHttpMethod.cs
-LassoLoginProtocolProfile.cs
-LassoMessageType.cs
-LassoProviderRole.cs
-LassoRequestType.cs
-LassoSignatureMethod.cs
-Lecp.cs
-LibAssertion.cs
-LibAuthnRequest.cs
-LibAuthnResponse.cs
-LibFederationTerminationNotification.cs
-LibLogoutRequest.cs
-LibLogoutResponse.cs
-LibRegisterNameIdentifierRequest.cs
-LibRegisterNameIdentifierResponse.cs
-LibStatusResponse.cs
-Login.cs
-Logout.cs
-NameIdentifierMapping.cs
-NameRegistration.cs
-Node.cs
-NodeArray.cs
-Options.cs
-PPMsgContact.cs
-PersonalProfileService.cs
-Provider.cs
-QueryItem.cs
-RemoveEntry.cs
-ResourceID.cs
-ResourceOffering.cs
-SWIGTYPE_p_LassoDiscoEncryptedResourceID.cs
-SWIGTYPE_p_LassoDiscoRequestedServiceType.cs
-SWIGTYPE_p_LassoDstNewData.cs
-SWIGTYPE_p_LassoMdProtocolType.cs
-SWIGTYPE_p_LassoSignatureType.cs
-SWIGTYPE_p_void.cs
-SamlAdvice.cs
-SamlAssertion.cs
-SamlAttributeStatement.cs
-SamlAuthenticationStatement.cs
-SamlConditions.cs
-SamlNameIdentifier.cs
-SamlSubject.cs
-SamlSubjectConfirmation.cs
-SamlSubjectLocality.cs
-SamlSubjectStatement.cs
-SamlpRequest.cs
-SamlpResponse.cs
-SamlpStatus.cs
-SamlpStatusCode.cs
-Server.cs
-ServiceInstance.cs
-Session.cs
-Status.cs
-StringArray.cs
-lassoPINVOKE.cs
-lasso.cs
-StringList.cs
-SamlpResponseAbstract.cs
-SamlpRequestAbstract.cs
-SamlSubjectStatementAbstract.cs
-SamlStatementAbstract.cs
-SamlConditionAbstract.cs
-SamlAuthorityBinding.cs
-SamlAudienceRestrictionCondition.cs
-SamlAttributeDesignator.cs
-SamlAttribute.cs
-SamlAttributeValue.cs
-NodeList.cs
-LibRequestAuthnContext.cs
-DiscoCredentials.cs
-DiscoDescription.cs
-DiscoEncryptedResourceID.cs
-DiscoInsertEntry.cs
-DiscoOptions.cs
-DiscoRemoveEntry.cs
-DiscoRequestedServiceType.cs
-DiscoResourceID.cs
-DiscoResourceOffering.cs
-DiscoServiceInstance.cs
-DowncastableNode.cs
-DstData.cs
-DstNewData.cs
-DstQueryItem.cs
-InteractionProfileService.cs
-IsHelp.cs
-IsInquiry.cs
-IsInquiryElement.cs
-IsInteractionRequest.cs
-IsInteractionResponse.cs
-IsInteractionStatement.cs
-IsItem.cs
-IsParameter.cs
-IsRedirectRequest.cs
-IsSelect.cs
-IsText.cs
-IsUserInteraction.cs
-ProfileService.cs
-UtilityStatus.cs
-HttpMethod.cs
-LoginProtocolProfile.cs
-MessageType.cs
-ProviderRole.cs
-RequestType.cs
-SignatureMethod.cs
-
diff --git a/csharp/AssemblyInfo.cs b/csharp/AssemblyInfo.cs
deleted file mode 100644
index 1fcdfb62..00000000
--- a/csharp/AssemblyInfo.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-[assembly:AssemblyDelaySign(false)]
-[assembly:AssemblyKeyFile("lasso-sharp-build.snk")]
-
diff --git a/csharp/Makefile.am b/csharp/Makefile.am
deleted file mode 100644
index 09b9f9da..00000000
--- a/csharp/Makefile.am
+++ /dev/null
@@ -1,130 +0,0 @@
-INCLUDES = -I$(top_builddir) -I$(top_srcdir)
-
-lib_LTLIBRARIES = liblassosharpglue.la
-
-liblassosharpglue_la_SOURCES = \
- liblassosharpglue_wrap.c
-
-liblassosharpglue_la_CFLAGS = \
- $(LASSO_CORE_CFLAGS) \
- -DSWIG_COBJECT_TYPES
-
-liblassosharpglue_la_LIBADD = \
- $(top_builddir)/lasso/liblasso.la \
- $(LASSO_LIBS)
-
-liblassosharpglue_la_LDFLAGS = -no-undefined -module -avoid-version
-
-liblassosharpglue_wrap.c: $(top_srcdir)/swig/Lasso.i $(top_srcdir)/swig/Lasso-wsf.i \
- $(top_srcdir)/swig/inheritance.h
- $(SWIG) -I$(top_builddir)/swig -v -csharp -namespace lasso -module lasso \
- -o liblassosharpglue_wrap.c $(top_srcdir)/swig/Lasso.i
- cp liblassosharpglue_wrap.c liblassosharpglue_wrap.c.bak
- sed -e 's/(char \*) "\(.*\)"/strdup("\1")/' \
- < liblassosharpglue_wrap.c.bak > liblassosharpglue_wrap.c
-
-dotnetlibdir = $(datadir)/dotnet/lasso/
-dotnetlib_DATA = lasso.dll lasso.dll.config
-
-lasso.dll: liblassosharpglue.la
- -$(LN_S) $(srcdir)/lasso-sharp.snk lasso-sharp-build.snk
- $(CSHARPCOMPILER) -out:lasso.dll -target:library $(srcdir)/*.cs
- rm -f lasso-sharp-build.snk
-
-pkgconfig_DATA = lasso-sharp.pc
-pkgconfigdir = $(libdir)/pkgconfig
-
-install-data-local:
- -$(GACUTIL) -i lasso.dll -f -package lasso -gacdir $(libdir)
-
-clean-local:
- -rm lasso.dll lasso-sharp.pc liblassosharpglue_wrap.c.bak
-
-SWIG_FILES = liblassosharpglue_wrap.c \
- Defederation.cs CheckVersionMode.cs \
- DowncastableNode.cs \
- Federation.cs Identity.cs \
- lasso.cs lassoPINVOKE.cs Lecp.cs LibAssertion.cs \
- LibAuthnRequest.cs \
- LibAuthnResponse.cs LibFederationTerminationNotification.cs \
- LibLogoutRequest.cs LibLogoutResponse.cs LibRegisterNameIdentifierRequest.cs \
- LibRegisterNameIdentifierResponse.cs LibRequestAuthnContext.cs \
- LibStatusResponse.cs Login.cs Logout.cs NameIdentifierMapping.cs \
- NameRegistration.cs Node.cs NodeList.cs Provider.cs \
- SamlAdvice.cs SamlAssertion.cs SamlAttribute.cs SamlAttributeDesignator.cs \
- SamlAttributeStatement.cs SamlAttributeValue.cs SamlAudienceRestrictionCondition.cs \
- SamlAuthenticationStatement.cs SamlAuthorityBinding.cs SamlConditionAbstract.cs \
- SamlConditions.cs SamlNameIdentifier.cs SamlpRequestAbstract.cs SamlpRequest.cs \
- SamlpResponseAbstract.cs SamlpResponse.cs SamlpStatusCode.cs SamlpStatus.cs \
- SamlStatementAbstract.cs SamlSubjectConfirmation.cs SamlSubject.cs \
- SamlSubjectLocality.cs SamlSubjectStatementAbstract.cs SamlSubjectStatement.cs \
- Server.cs Session.cs StringList.cs SWIGTYPE_p_LassoMdProtocolType.cs \
- SWIGTYPE_p_LassoSignatureType.cs SWIGTYPE_p_void.cs \
- HttpMethod.cs ProviderRole.cs SignatureMethod.cs LoginProtocolProfile.cs \
- RequestType.cs
-
-if WSF_ENABLED
-SWIG_WSF_FILES = Authentication.cs \
- DiscoAuthenticateRequester.cs \
- DiscoAuthenticateSessionContext.cs \
- DiscoAuthorizeRequester.cs \
- DiscoCredentials.cs \
- DiscoDescription.cs \
- DiscoEncryptedResourceID.cs \
- DiscoEncryptResourceID.cs \
- DiscoGenerateBearerToken.cs \
- DiscoInsertEntry.cs \
- DiscoModify.cs \
- DiscoModifyResponse.cs \
- DiscoOptions.cs \
- DiscoQuery.cs \
- DiscoQueryResponse.cs \
- DiscoRemoveEntry.cs \
- DiscoRequestedServiceType.cs \
- DiscoResourceID.cs \
- DiscoResourceOffering.cs \
- DiscoSendSingleLogout.cs \
- DiscoServiceInstance.cs \
- Discovery.cs \
- DstData.cs \
- DstModification.cs \
- DstModify.cs \
- DstModifyResponse.cs \
- DstNewData.cs \
- DstQueryItem.cs \
- DstQuery.cs \
- DstQueryResponse.cs \
- InteractionProfileService.cs \
- IsHelp.cs \
- IsInquiryElement.cs \
- IsInquiry.cs \
- IsInteractionRequest.cs \
- IsInteractionResponse.cs \
- IsInteractionStatement.cs \
- IsItem.cs \
- IsParameter.cs \
- IsRedirectRequest.cs \
- IsSelect.cs \
- IsText.cs \
- IsUserInteraction.cs \
- lassoConstants.cs \
- ProfileService.cs \
- SaCredentials.cs \
- SaSASLRequest.cs \
- SaSASLResponse.cs \
- SoapBindingCorrelation.cs \
- SoapBody.cs \
- SoapEnvelope.cs \
- SoapHeader.cs \
- SWIGTYPE_p_LassoSoapBindingProvider.cs \
- UserAccount.cs \
- UtilityStatus.cs \
- WsfProfile.cs \
- WsseSecurity.cs
-endif
-
-EXTRA_DIST = lasso-sharp.pc.in lasso.dll.config AssemblyInfo.cs lasso-sharp.snk \
- $(SWIG_FILES) $(SWIG_WSF_FILES)
-
-MAINTAINERCLEANFILES = Makefile.in $(SWIG_FILES) $(SWIG_WSF_FILES)
-
diff --git a/csharp/examples/perfs.cs b/csharp/examples/perfs.cs
deleted file mode 100644
index f72d126f..00000000
--- a/csharp/examples/perfs.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * install lasso then compile with
- * mcs -g -nologo -pkg:lasso-sharp -out:perfs.exe perfs.cs
- */
-
-using System;
-
-public class perfs
-{
- static void Main()
- {
- lasso.lasso.init();
-
- lasso.Server server = new lasso.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.LassoProviderRole.PROVIDER_ROLE_SP,
- "../../tests/data/idp1-la/metadata.xml",
- "../../tests/data/idp1-la/public-key.pem",
- "../../tests/data/ca1-la/certificate.pem");
-
- lasso.Login login = new lasso.Login(server);
-
- login.initAuthnRequest("https://idp1/metadata", (lasso.LassoHttpMethod)4);
- lasso.LibAuthnRequest request = (lasso.LibAuthnRequest)login.request;
- login.request.protocolProfile = lasso.lasso.LIB_PROTOCOL_PROFILE_BRWS_POST;
- login.buildAuthnRequestMsg();
-
- Console.WriteLine(login.msgUrl);
-
- lasso.lasso.shutdown();
- }
-}
diff --git a/csharp/examples/runme.cs b/csharp/examples/runme.cs
deleted file mode 100644
index e0114b94..00000000
--- a/csharp/examples/runme.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * install lasso then compile with
- * mcs -g -nologo -pkg:lasso-sharp -out:runme.exe runme.cs
- */
-
-using System;
-
-public class runme
-{
- static void Main()
- {
- lasso.lasso.init();
-
- lasso.Server server = new lasso.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.LassoProviderRole.PROVIDER_ROLE_SP,
- "../../tests/data/idp1-la/metadata.xml",
- "../../tests/data/idp1-la/public-key.pem",
- "../../tests/data/ca1-la/certificate.pem");
- Console.WriteLine(server.dump());
-
- lasso.lasso.shutdown();
- }
-}
diff --git a/csharp/lasso-sharp.pc.in b/csharp/lasso-sharp.pc.in
deleted file mode 100644
index 9baf8572..00000000
--- a/csharp/lasso-sharp.pc.in
+++ /dev/null
@@ -1,8 +0,0 @@
-prefix=@prefix@
-datadir=@datadir@
-
-Name: Lasso#
-Version: @VERSION@
-Description: Lasso# - Lasso .NET Binding
-Libs: -r:${datadir}/dotnet/lasso/lasso.dll
-
diff --git a/csharp/lasso-sharp.snk b/csharp/lasso-sharp.snk
deleted file mode 100644
index a8a75b80..00000000
--- a/csharp/lasso-sharp.snk
+++ /dev/null
Binary files differ
diff --git a/csharp/lasso.dll.config b/csharp/lasso.dll.config
deleted file mode 100644
index 27976b16..00000000
--- a/csharp/lasso.dll.config
+++ /dev/null
@@ -1,3 +0,0 @@
-<configuration>
- <dllmap dll="lasso" target="liblassosharpglue.so"/>
-</configuration>
diff --git a/csharp/tests/BindingTests.cs b/csharp/tests/BindingTests.cs
deleted file mode 100644
index 88022ef9..00000000
--- a/csharp/tests/BindingTests.cs
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * $Id$
- *
- * C# 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, install Lasso then compile with:
- * export PKG_CONFIG_PATH=../
- * ln -s ../lasso.dll
- * ln -s ../lasso.dll.config
- * mcs -g -nologo -pkg:lasso-sharp -out:BindingTests.exe BindingTests.cs
- */
-
-using System;
-
-public class BindingTests {
- static void assertEquals(int i1, int i2) {
- if (i1 != i2)
- Console.WriteLine("Assertion failed: %d != %d", i1, i2);
- }
-
- static void assertEquals(String s1, String s2) {
- if (s1 != s2)
- Console.WriteLine("Assertion failed: %s != %s", s1, s2);
- }
-
- static void assertNull(Object o) {
- if (o != null)
- Console.WriteLine("Assertion failed: %s is not null", o);
- }
-
- static void assertNull(String s) {
- if (s != null)
- Console.WriteLine("Assertion failed: %s is not null", s);
- }
-
- static void Main() {
- lasso.lasso.init();
- test01();
- test02();
- test03();
- test04();
- test05();
- test06();
- lasso.lasso.shutdown();
- }
-
- static void test01() {
- Console.Write("Create and delete nodes.");
-
- lasso.LibAuthnRequest authnRequest = new lasso.LibAuthnRequest();
- authnRequest = null;
-
- Console.WriteLine(".. OK");
- }
-
- static void test02() {
- Console.Write("Get & set simple attributes of nodes.");
-
- lasso.LibAuthnRequest authnRequest = new lasso.LibAuthnRequest();
-
- // Test a string attribute.
- assertNull(authnRequest.consent);
- authnRequest.consent = lasso.lasso.LIB_CONSENT_OBTAINED;
- assertEquals(authnRequest.consent, lasso.lasso.LIB_CONSENT_OBTAINED);
- authnRequest.consent = null;
- assertNull(authnRequest.consent);
-
- // Test a renamed string attribute.
- assertNull(authnRequest.relayState);
- authnRequest.relayState = "Hello World!";
- assertEquals(authnRequest.relayState, "Hello World!");
- authnRequest.relayState = null;
- assertNull(authnRequest.relayState);
-
- // Test an integer attribute.
- assertEquals(authnRequest.majorVersion, 0);
- authnRequest.majorVersion = 314;
- assertEquals(authnRequest.majorVersion, 314);
-
- authnRequest = null;
-
- Console.WriteLine(".. OK");
- }
-
- static void test03() {
- Console.Write("Get & set attributes of nodes of type string list.");
-
- lasso.LibAuthnRequest authnRequest = new lasso.LibAuthnRequest();
-
- assertNull(authnRequest.respondWith);
-
- lasso.StringList respondWith = new lasso.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.respondWith = respondWith;
- assertEquals(authnRequest.respondWith.getItem(0), "first string");
- assertEquals(authnRequest.respondWith.getItem(1), "second string");
- assertEquals(authnRequest.respondWith.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.respondWith.getItem(0), "first string");
- assertEquals(authnRequest.respondWith.getItem(1), "second string");
- assertEquals(authnRequest.respondWith.getItem(2), "third string");
- respondWith = authnRequest.respondWith;
- assertEquals(respondWith.getItem(0), "first string");
- assertEquals(respondWith.getItem(1), "second string");
- assertEquals(respondWith.getItem(2), "third string");
- respondWith = null;
- assertEquals(authnRequest.respondWith.getItem(0), "first string");
- assertEquals(authnRequest.respondWith.getItem(1), "second string");
- assertEquals(authnRequest.respondWith.getItem(2), "third string");
- authnRequest.respondWith = null;
- assertNull(authnRequest.respondWith);
-
- authnRequest = null;
-
- Console.WriteLine(".. OK");
- }
-
- static void test04() {
- Console.Write("Get & set attributes of nodes of type node list.");
-
- lasso.SamlpResponse response = new lasso.SamlpResponse();
-
- assertNull(response.assertion);
- lasso.NodeList assertions = new lasso.NodeList();
- assertEquals(assertions.length(), 0);
- lasso.SamlAssertion assertion1 = new lasso.SamlAssertion();
- assertion1.assertionId = "assertion 1";
- assertions.append(assertion1);
- assertEquals(assertions.length(), 1);
- assertEquals(((lasso.SamlAssertion) assertions.getItem(0)).assertionId,
- "assertion 1");
- assertEquals(((lasso.SamlAssertion) assertions.getItem(0)).assertionId,
- "assertion 1");
- lasso.SamlAssertion assertion2 = new lasso.SamlAssertion();
- assertion2.assertionId = "assertion 2";
- assertions.append(assertion2);
- assertEquals(assertions.length(), 2);
- assertEquals(((lasso.SamlAssertion) assertions.getItem(0)).assertionId,
- "assertion 1");
- assertEquals(((lasso.SamlAssertion) assertions.getItem(1)).assertionId,
- "assertion 2");
- lasso.SamlAssertion assertion3 = new lasso.SamlAssertion();
- assertion3.assertionId = "assertion 3";
- assertions.append(assertion3);
- assertEquals(assertions.length(), 3);
- assertEquals(((lasso.SamlAssertion) assertions.getItem(0)).assertionId,
- "assertion 1");
- assertEquals(((lasso.SamlAssertion) assertions.getItem(1)).assertionId,
- "assertion 2");
- assertEquals(((lasso.SamlAssertion) assertions.getItem(2)).assertionId,
- "assertion 3");
- response.assertion = assertions;
- assertEquals(((lasso.SamlAssertion) response.assertion.getItem(0)).assertionId,
- "assertion 1");
- assertEquals(((lasso.SamlAssertion) response.assertion.getItem(1)).assertionId,
- "assertion 2");
- assertEquals(((lasso.SamlAssertion) response.assertion.getItem(2)).assertionId,
- "assertion 3");
- assertEquals(((lasso.SamlAssertion) assertions.getItem(0)).assertionId,
- "assertion 1");
- assertEquals(((lasso.SamlAssertion) assertions.getItem(1)).assertionId,
- "assertion 2");
- assertEquals(((lasso.SamlAssertion) assertions.getItem(2)).assertionId,
- "assertion 3");
- assertions = null;;
- assertEquals(((lasso.SamlAssertion) response.assertion.getItem(0)).assertionId,
- "assertion 1");
- assertEquals(((lasso.SamlAssertion) response.assertion.getItem(1)).assertionId,
- "assertion 2");
- assertEquals(((lasso.SamlAssertion) response.assertion.getItem(2)).assertionId,
- "assertion 3");
- assertions = response.assertion;
- assertEquals(((lasso.SamlAssertion) assertions.getItem(0)).assertionId,
- "assertion 1");
- assertEquals(((lasso.SamlAssertion) assertions.getItem(1)).assertionId,
- "assertion 2");
- assertEquals(((lasso.SamlAssertion) assertions.getItem(2)).assertionId,
- "assertion 3");
- assertions = null;
- assertEquals(((lasso.SamlAssertion) response.assertion.getItem(0)).assertionId,
- "assertion 1");
- assertEquals(((lasso.SamlAssertion) response.assertion.getItem(1)).assertionId,
- "assertion 2");
- assertEquals(((lasso.SamlAssertion) response.assertion.getItem(2)).assertionId,
- "assertion 3");
- response.assertion = null;
- assertNull(response.assertion);
-
- response = null;
-
- Console.WriteLine(".. OK");
- }
-
- static void test05() {
- Console.Write("Get & set attributes of nodes of type XML list.");
-
- lasso.LibAuthnRequest authnRequest = new lasso.LibAuthnRequest();
-
- assertNull(authnRequest.extension);
-
- 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>";
- lasso.StringList extension = new lasso.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.extension = extension;
- assertEquals(authnRequest.extension.getItem(0), actionString1);
- assertEquals(authnRequest.extension.getItem(1), actionString2);
- assertEquals(authnRequest.extension.getItem(2), actionString3);
- assertEquals(extension.getItem(0), actionString1);
- assertEquals(extension.getItem(1), actionString2);
- assertEquals(extension.getItem(2), actionString3);
- extension = null;
- assertEquals(authnRequest.extension.getItem(0), actionString1);
- assertEquals(authnRequest.extension.getItem(1), actionString2);
- assertEquals(authnRequest.extension.getItem(2), actionString3);
- extension = authnRequest.extension;
- assertEquals(extension.getItem(0), actionString1);
- assertEquals(extension.getItem(1), actionString2);
- assertEquals(extension.getItem(2), actionString3);
- extension = null;
- assertEquals(authnRequest.extension.getItem(0), actionString1);
- assertEquals(authnRequest.extension.getItem(1), actionString2);
- assertEquals(authnRequest.extension.getItem(2), actionString3);
- authnRequest.extension = null;
- assertNull(authnRequest.extension);
-
- authnRequest = null;
-
- Console.WriteLine(".. OK");
- }
-
- static void test06() {
- Console.Write("Get & set attributes of nodes of type node.");
-
- lasso.Login login = new lasso.Login(new lasso.Server(null, null, null, null));
-
- assertNull(login.request);
- login.request = (lasso.SamlpRequestAbstract) new lasso.LibAuthnRequest();
- ((lasso.LibAuthnRequest) login.request).consent = lasso.lasso.LIB_CONSENT_OBTAINED;
- assertEquals(((lasso.LibAuthnRequest) login.request).consent,
- lasso.lasso.LIB_CONSENT_OBTAINED);
- login.request = null;
- assertNull(login.request);
-
- login = null;
-
- Console.WriteLine(".. OK");
- }
-}