From 201afd98e355dee1aece1ff8883d78c006d071ea Mon Sep 17 00:00:00 2001 From: Emmanuel Raviart Date: Fri, 30 Jul 2004 20:35:07 +0000 Subject: Removed last profile_context or profileContext. --- java/src/c/com_entrouvert_lasso_Lasso.c | 2 +- java/src/c/com_entrouvert_lasso_LassoProfile.c | 193 +++++++++++++++++++++ .../c/com_entrouvert_lasso_LassoProfileContext.c | 193 --------------------- java/src/java/com/entrouvert/lasso/LassoLogin.java | 2 +- .../src/java/com/entrouvert/lasso/LassoLogout.java | 2 +- .../java/com/entrouvert/lasso/LassoProfile.java | 77 ++++++++ .../com/entrouvert/lasso/LassoProfileContext.java | 77 -------- python/lasso.py | 4 +- python/tests/login_tests.py | 36 ++-- 9 files changed, 293 insertions(+), 293 deletions(-) create mode 100644 java/src/c/com_entrouvert_lasso_LassoProfile.c delete mode 100644 java/src/c/com_entrouvert_lasso_LassoProfileContext.c create mode 100644 java/src/java/com/entrouvert/lasso/LassoProfile.java delete mode 100644 java/src/java/com/entrouvert/lasso/LassoProfileContext.java diff --git a/java/src/c/com_entrouvert_lasso_Lasso.c b/java/src/c/com_entrouvert_lasso_Lasso.c index 80ffd8ad..170d44b4 100644 --- a/java/src/c/com_entrouvert_lasso_Lasso.c +++ b/java/src/c/com_entrouvert_lasso_Lasso.c @@ -42,7 +42,7 @@ JNIEXPORT jint JNICALL Java_com_entrouvert_lasso_Lasso_getRequestTypeFromSoapMsg char *value; value = (char*)(*env)->GetStringUTFChars(env, _value, NULL); - result = lasso_profile_context_get_request_type_from_soap_msg(value); + result = lasso_profile_get_request_type_from_soap_msg(value); (*env)->ReleaseStringUTFChars(env, _value, value); return result; } diff --git a/java/src/c/com_entrouvert_lasso_LassoProfile.c b/java/src/c/com_entrouvert_lasso_LassoProfile.c new file mode 100644 index 00000000..8f1cb94c --- /dev/null +++ b/java/src/c/com_entrouvert_lasso_LassoProfile.c @@ -0,0 +1,193 @@ +/* + * JLasso -- Java bindings for Lasso library + * + * Copyright (C) 2004 Entr'ouvert + * http://lasso.entrouvert.org + * + * Authors: Benjamin Poussin + * Emmanuel Raviart + * + * 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 +#include +#include + +JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfile_getMsgBody +(JNIEnv * env, jobject this){ + LassoProfile * profile; + char * result; + + profile = getCObject(env, this); + + result = profile->msg_body; + + return (*env)->NewStringUTF(env, result); +} + +JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfile_getMsgRelayState +(JNIEnv * env, jobject this){ + LassoProfile * profile; + char * result; + + profile = getCObject(env, this); + + result = profile->msg_relayState; + + return (*env)->NewStringUTF(env, result); +} + +JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfile_getMsgUrl +(JNIEnv * env, jobject this){ + LassoProfile * profile; + char * result; + + profile = getCObject(env, this); + + result = profile->msg_url; + + return (*env)->NewStringUTF(env, result); +} + +JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfile_getNameIdentifier +(JNIEnv * env, jobject this){ + LassoProfile * profile; + char *result; + + profile = getCObject(env, this); + + result = profile->nameIdentifier; + if (result == NULL) + return NULL; + return (*env)->NewStringUTF(env, result); +} + +JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfile_getProviderID +(JNIEnv * env, jobject this){ + LassoProfile * profile; + char * result; + + profile = getCObject(env, this); + + result = profile->remote_providerID; + + return (*env)->NewStringUTF(env, result); +} + +JNIEXPORT jint JNICALL Java_com_entrouvert_lasso_LassoProfile_getRequestType +(JNIEnv * env, jobject this){ + LassoProfile * profile; + char * result; + + profile = getCObject(env, this); + + return profile->request_type; +} + +JNIEXPORT jint JNICALL Java_com_entrouvert_lasso_LassoProfile_getResponseType +(JNIEnv * env, jobject this){ + LassoProfile * profile; + char * result; + + profile = getCObject(env, this); + + return profile->response_type; +} + +JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfile_initRequestField +(JNIEnv * env, jobject this){ + LassoProfile * profile; + char * fieldName = "request"; + char * fieldType = "Lcom/entrouvert/lasso/LassoNode;"; + char * javaObjectClassName = "com/entrouvert/lasso/LassoNode"; + LassoNode *cObject; + + profile = getCObject(env, this); + cObject = profile->request; + + if (profile->request_type == lassoMessageTypeAuthnRequest) { + javaObjectClassName = "com/entrouvert/lasso/LassoAuthnRequest"; + } else if(profile->request_type == lassoMessageTypeRequest) { + javaObjectClassName = "com/entrouvert/lasso/LassoRequest"; + } else { + /* FIXME: Throw error */ + } + checkAndSetField(env, this, fieldName, fieldType, javaObjectClassName, cObject); +} + +JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfile_initResponseField +(JNIEnv * env, jobject this){ + LassoProfile * profile; + char * fieldName = "response"; + char * fieldType = "Lcom/entrouvert/lasso/LassoNode;"; + char * javaObjectClassName = "com/entrouvert/lasso/LassoNode"; + LassoNode *cObject; + + profile = getCObject(env, this); + cObject = profile->response; + + if(profile->response_type == lassoMessageTypeAuthnResponse){ + javaObjectClassName = "com/entrouvert/lasso/LassoAuthnResponse"; + }else if(profile->response_type == lassoMessageTypeResponse){ + javaObjectClassName = "com/entrouvert/lasso/LassoResponse"; + }else{ + /* FIXME: Throw error */ + } + + checkAndSetField(env, this, fieldName, fieldType, javaObjectClassName, cObject); +} + +JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfile_initServerField +(JNIEnv * env, jobject this){ + LassoProfile * profile; + char * fieldName = "server"; + char * fieldType = "Lcom/entrouvert/lasso/LassoServer;"; + char * javaObjectClassName = "com/entrouvert/lasso/LassoServer"; + LassoServer *cObject; + + profile = getCObject(env, this); + cObject = profile->server; + + checkAndSetField(env, this, fieldName, fieldType, javaObjectClassName, cObject); +} + +JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfile_initUserField +(JNIEnv * env, jobject this){ + LassoProfile * profile; + char * fieldName = "user"; + char * fieldType = "Lcom/entrouvert/lasso/LassoUser;"; + char * javaObjectClassName = "com/entrouvert/lasso/LassoUser"; + LassoUser *cObject; + + profile = getCObject(env, this); + cObject = profile->user; + + checkAndSetField(env, this, fieldName, fieldType, javaObjectClassName, cObject); +} + +JNIEXPORT jint JNICALL Java_com_entrouvert_lasso_LassoProfile_setUserFromDump +(JNIEnv * env, jobject this, jstring _dump) { + int result; + LassoProfile *profile; + char *dump; + + profile = getCObject(env, this); + dump = (char*)(*env)->GetStringUTFChars(env, _dump, NULL); + result = lasso_profile_set_user_from_dump(profile, dump); + (*env)->ReleaseStringUTFChars(env, _dump, dump); + return result; +} + diff --git a/java/src/c/com_entrouvert_lasso_LassoProfileContext.c b/java/src/c/com_entrouvert_lasso_LassoProfileContext.c deleted file mode 100644 index 0315e135..00000000 --- a/java/src/c/com_entrouvert_lasso_LassoProfileContext.c +++ /dev/null @@ -1,193 +0,0 @@ -/* - * JLasso -- Java bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Benjamin Poussin - * Emmanuel Raviart - * - * 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 -#include -#include - -JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfileContext_getMsgBody -(JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; - char * result; - - profileContext = getCObject(env, this); - - result = profileContext->msg_body; - - return (*env)->NewStringUTF(env, result); -} - -JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfileContext_getMsgRelayState -(JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; - char * result; - - profileContext = getCObject(env, this); - - result = profileContext->msg_relayState; - - return (*env)->NewStringUTF(env, result); -} - -JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfileContext_getMsgUrl -(JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; - char * result; - - profileContext = getCObject(env, this); - - result = profileContext->msg_url; - - return (*env)->NewStringUTF(env, result); -} - -JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfileContext_getNameIdentifier -(JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; - char *result; - - profileContext = getCObject(env, this); - - result = profileContext->nameIdentifier; - if (result == NULL) - return NULL; - return (*env)->NewStringUTF(env, result); -} - -JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfileContext_getProviderID -(JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; - char * result; - - profileContext = getCObject(env, this); - - result = profileContext->remote_providerID; - - return (*env)->NewStringUTF(env, result); -} - -JNIEXPORT jint JNICALL Java_com_entrouvert_lasso_LassoProfileContext_getRequestType -(JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; - char * result; - - profileContext = getCObject(env, this); - - return profileContext->request_type; -} - -JNIEXPORT jint JNICALL Java_com_entrouvert_lasso_LassoProfileContext_getResponseType -(JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; - char * result; - - profileContext = getCObject(env, this); - - return profileContext->response_type; -} - -JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfileContext_initRequestField -(JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; - char * fieldName = "request"; - char * fieldType = "Lcom/entrouvert/lasso/LassoNode;"; - char * javaObjectClassName = "com/entrouvert/lasso/LassoNode"; - LassoNode *cObject; - - profileContext = getCObject(env, this); - cObject = profileContext->request; - - if (profileContext->request_type == lassoMessageTypeAuthnRequest) { - javaObjectClassName = "com/entrouvert/lasso/LassoAuthnRequest"; - } else if(profileContext->request_type == lassoMessageTypeRequest) { - javaObjectClassName = "com/entrouvert/lasso/LassoRequest"; - } else { - /* FIXME: Throw error */ - } - checkAndSetField(env, this, fieldName, fieldType, javaObjectClassName, cObject); -} - -JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfileContext_initResponseField -(JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; - char * fieldName = "response"; - char * fieldType = "Lcom/entrouvert/lasso/LassoNode;"; - char * javaObjectClassName = "com/entrouvert/lasso/LassoNode"; - LassoNode *cObject; - - profileContext = getCObject(env, this); - cObject = profileContext->response; - - if(profileContext->response_type == lassoMessageTypeAuthnResponse){ - javaObjectClassName = "com/entrouvert/lasso/LassoAuthnResponse"; - }else if(profileContext->response_type == lassoMessageTypeResponse){ - javaObjectClassName = "com/entrouvert/lasso/LassoResponse"; - }else{ - /* FIXME: Throw error */ - } - - checkAndSetField(env, this, fieldName, fieldType, javaObjectClassName, cObject); -} - -JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfileContext_initServerField -(JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; - char * fieldName = "server"; - char * fieldType = "Lcom/entrouvert/lasso/LassoServer;"; - char * javaObjectClassName = "com/entrouvert/lasso/LassoServer"; - LassoServer *cObject; - - profileContext = getCObject(env, this); - cObject = profileContext->server; - - checkAndSetField(env, this, fieldName, fieldType, javaObjectClassName, cObject); -} - -JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfileContext_initUserField -(JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; - char * fieldName = "user"; - char * fieldType = "Lcom/entrouvert/lasso/LassoUser;"; - char * javaObjectClassName = "com/entrouvert/lasso/LassoUser"; - LassoUser *cObject; - - profileContext = getCObject(env, this); - cObject = profileContext->user; - - checkAndSetField(env, this, fieldName, fieldType, javaObjectClassName, cObject); -} - -JNIEXPORT jint JNICALL Java_com_entrouvert_lasso_LassoProfileContext_setUserFromDump -(JNIEnv * env, jobject this, jstring _dump) { - int result; - LassoProfileContext *profileContext; - char *dump; - - profileContext = getCObject(env, this); - dump = (char*)(*env)->GetStringUTFChars(env, _dump, NULL); - result = lasso_profile_context_set_user_from_dump(profileContext, dump); - (*env)->ReleaseStringUTFChars(env, _dump, dump); - return result; -} - diff --git a/java/src/java/com/entrouvert/lasso/LassoLogin.java b/java/src/java/com/entrouvert/lasso/LassoLogin.java index 3df32bd1..461078dc 100644 --- a/java/src/java/com/entrouvert/lasso/LassoLogin.java +++ b/java/src/java/com/entrouvert/lasso/LassoLogin.java @@ -24,7 +24,7 @@ package com.entrouvert.lasso; -public class LassoLogin extends LassoProfileContext { // LassoLogin +public class LassoLogin extends LassoProfile { // LassoLogin public LassoLogin(LassoServer server){ this.server = server; diff --git a/java/src/java/com/entrouvert/lasso/LassoLogout.java b/java/src/java/com/entrouvert/lasso/LassoLogout.java index 0b37cef5..3af45b2d 100644 --- a/java/src/java/com/entrouvert/lasso/LassoLogout.java +++ b/java/src/java/com/entrouvert/lasso/LassoLogout.java @@ -24,7 +24,7 @@ package com.entrouvert.lasso; -public class LassoLogout extends LassoProfileContext { // LassoLogout +public class LassoLogout extends LassoProfile { // LassoLogout public LassoLogout(LassoServer server, int providerType){ this.server = server; diff --git a/java/src/java/com/entrouvert/lasso/LassoProfile.java b/java/src/java/com/entrouvert/lasso/LassoProfile.java new file mode 100644 index 00000000..02e1c590 --- /dev/null +++ b/java/src/java/com/entrouvert/lasso/LassoProfile.java @@ -0,0 +1,77 @@ +/* + * JLasso -- Java bindings for Lasso library + * + * Copyright (C) 2004 Entr'ouvert + * http://lasso.entrouvert.org + * + * Authors: Benjamin Poussin + * Emmanuel Raviart + * + * 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 LassoProfile extends LassoObject { // LassoProfile + protected LassoNode request = null; + protected LassoNode response = null; + protected LassoServer server = null; + protected LassoUser user = null; + + native protected void initRequestField(); + + native protected void initResponseField(); + + native protected void initServerField(); + + native protected void initUserField(); + + native public String getMsgBody(); + + native public String getMsgRelayState(); + + native public String getNameIdentifier(); + + native public String getMsgUrl(); + + native public String getProviderID(); + + public LassoNode getRequest(){ + initRequestField(); + return request; + } + + native public int getRequestType(); + + public LassoNode getResponse(){ + initResponseField(); + return response; + } + + native public int gettResponseType(); + + public LassoServer getServer(){ + initServerField(); + return server; + } + + public LassoUser getUser(){ + initUserField(); + return user; + } + + native public int setUserFromDump(String userDump); + +} // LassoProfile diff --git a/java/src/java/com/entrouvert/lasso/LassoProfileContext.java b/java/src/java/com/entrouvert/lasso/LassoProfileContext.java deleted file mode 100644 index 6fff87ae..00000000 --- a/java/src/java/com/entrouvert/lasso/LassoProfileContext.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * JLasso -- Java bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Benjamin Poussin - * Emmanuel Raviart - * - * 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 LassoProfileContext extends LassoObject { // LassoProfileContext - protected LassoNode request = null; - protected LassoNode response = null; - protected LassoServer server = null; - protected LassoUser user = null; - - native protected void initRequestField(); - - native protected void initResponseField(); - - native protected void initServerField(); - - native protected void initUserField(); - - native public String getMsgBody(); - - native public String getMsgRelayState(); - - native public String getNameIdentifier(); - - native public String getMsgUrl(); - - native public String getProviderID(); - - public LassoNode getRequest(){ - initRequestField(); - return request; - } - - native public int getRequestType(); - - public LassoNode getResponse(){ - initResponseField(); - return response; - } - - native public int gettResponseType(); - - public LassoServer getServer(){ - initServerField(); - return server; - } - - public LassoUser getUser(){ - initUserField(); - return user; - } - - native public int setUserFromDump(String userDump); - -} // LassoProfileContext diff --git a/python/lasso.py b/python/lasso.py index c6653b17..77bf4fc2 100644 --- a/python/lasso.py +++ b/python/lasso.py @@ -855,7 +855,7 @@ class Session: def remove_assertion(self, remote_providerID): lassomod.session_remove_assertion(self, remote_providerID) -## ProfileContext +## Profile # Request types requestTypeLogin = 1 requestTypeLogout = 2 @@ -864,7 +864,7 @@ requestTypeRegisterNameIdentifier = 4 requestTypeNameIdentifierMapping = 5 def get_request_type_from_soap_msg(soap_buffer): - return lassomod.profile_context_get_request_type_from_soap_msg(soap_buffer); + return lassomod.profile_get_request_type_from_soap_msg(soap_buffer); class Profile: """\brief Short desc diff --git a/python/tests/login_tests.py b/python/tests/login_tests.py index 28a0b300..b5d30216 100644 --- a/python/tests/login_tests.py +++ b/python/tests/login_tests.py @@ -117,8 +117,8 @@ class LoginTestCase(unittest.TestCase): self.failUnlessEqual(idpLoginContext.build_artifact_msg( userAuthenticated, authenticationMethod, "FIXME: reauthenticateOnOrAfter", lasso.httpMethodRedirect), 0) - idpUserContextDump = idpLoginContext.user.dump() - self.failUnless(idpUserContextDump) + idpIdentityContextDump = idpLoginContext.get_identity().dump() + self.failUnless(idpIdentityContextDump) responseUrl = idpLoginContext.msg_url responseQuery = responseUrl.split("?", 1)[1] soapResponseMsg = idpLoginContext.response_dump @@ -144,12 +144,12 @@ class LoginTestCase(unittest.TestCase): self.failUnlessEqual(spLoginContext.process_response_msg(soapResponseMsg), 0) self.failUnlessEqual(spLoginContext.nameIdentifier, nameIdentifier) # The user doesn't have any federation yet. - self.failUnlessEqual(spLoginContext.create_user(None), 0) - spUserContext = spLoginContext.user - self.failUnless(spUserContext) - spUserContextDump = spUserContext.dump() - self.failUnless(spUserContextDump) - authenticationMethod = spUserContext.get_authentication_method() + self.failUnlessEqual(spLoginContext.create_identity(None), 0) + spIdentityContext = spLoginContext.identity + self.failUnless(spIdentityContext) + spIdentityContextDump = spIdentityContext.dump() + self.failUnless(spIdentityContextDump) + authenticationMethod = spIdentityContext.get_authentication_method() self.failUnlessEqual(authenticationMethod, lasso.samlAuthenticationMethodPassword) # Service provider logout. @@ -158,8 +158,8 @@ class LoginTestCase(unittest.TestCase): spContext = lasso.Server.new_from_dump(spContextDump) self.failUnless(spContext) spLogoutContext = lasso.Logout.new(spContext, lasso.providerTypeSp) - self.failUnless(spUserContextDump) - spLogoutContext.set_user_from_dump(spUserContextDump) + self.failUnless(spIdentityContextDump) + spLogoutContext.set_identity_from_dump(spIdentityContextDump) self.failUnlessEqual(spLogoutContext.init_request(), 0) self.failUnlessEqual(spLogoutContext.build_request_msg(), 0) soapEndpoint = spLogoutContext.msg_url @@ -176,13 +176,13 @@ class LoginTestCase(unittest.TestCase): self.failUnlessEqual( idpLogoutContext.load_request_msg(soapRequestMsg, lasso.httpMethodSoap), 0) self.failUnlessEqual(idpLogoutContext.nameIdentifier, nameIdentifier) - self.failUnless(idpUserContextDump) - self.failUnlessEqual(idpLogoutContext.set_user_from_dump(idpUserContextDump), 0) + self.failUnless(idpIdentityContextDump) + self.failUnlessEqual(idpLogoutContext.set_identity_from_dump(idpIdentityContextDump), 0) self.failUnlessEqual(idpLogoutContext.process_request(), 0) - idpUserContext = idpLogoutContext.user - self.failUnless(idpUserContext) - idpUserContextDump = idpUserContext.dump() - self.failUnless(idpUserContextDump) + idpIdentityContext = idpLogoutContext.identity + self.failUnless(idpIdentityContext) + idpIdentityContextDump = idpIdentityContext.dump() + self.failUnless(idpIdentityContextDump) # There is no other service provider from which the user must be logged out. self.failUnlessEqual(idpLogoutContext.get_next_providerID(), None) self.failUnlessEqual(idpLogoutContext.build_response_msg(), 0) @@ -191,8 +191,8 @@ class LoginTestCase(unittest.TestCase): # Service provider logout (step 2: process SOAP response). self.failUnlessEqual( spLogoutContext.process_response_msg(soapResponseMsg, lasso.httpMethodSoap), 0) - spUserContextDump = spLogoutContext.user.dump() - self.failUnless(spUserContextDump) + spIdentityContextDump = spLogoutContext.identity.dump() + self.failUnless(spIdentityContextDump) suite1 = unittest.makeSuite(LoginTestCase, 'test') -- cgit