diff options
author | Emmanuel Raviart <eraviart@entrouvert.com> | 2004-07-30 20:35:07 +0000 |
---|---|---|
committer | Emmanuel Raviart <eraviart@entrouvert.com> | 2004-07-30 20:35:07 +0000 |
commit | 201afd98e355dee1aece1ff8883d78c006d071ea (patch) | |
tree | ba68e0209d403ab43988650f2959eba97b10e2ff | |
parent | 89a351e8b93bd426b13e5033a3b61ba22ea02729 (diff) | |
download | lasso-201afd98e355dee1aece1ff8883d78c006d071ea.tar.gz lasso-201afd98e355dee1aece1ff8883d78c006d071ea.tar.xz lasso-201afd98e355dee1aece1ff8883d78c006d071ea.zip |
Removed last profile_context or profileContext.
-rw-r--r-- | java/src/c/com_entrouvert_lasso_Lasso.c | 2 | ||||
-rw-r--r-- | java/src/c/com_entrouvert_lasso_LassoProfile.c (renamed from java/src/c/com_entrouvert_lasso_LassoProfileContext.c) | 106 | ||||
-rw-r--r-- | java/src/java/com/entrouvert/lasso/LassoLogin.java | 2 | ||||
-rw-r--r-- | java/src/java/com/entrouvert/lasso/LassoLogout.java | 2 | ||||
-rw-r--r-- | java/src/java/com/entrouvert/lasso/LassoProfile.java (renamed from java/src/java/com/entrouvert/lasso/LassoProfileContext.java) | 4 | ||||
-rw-r--r-- | python/lasso.py | 4 | ||||
-rw-r--r-- | python/tests/login_tests.py | 36 |
7 files changed, 78 insertions, 78 deletions
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_LassoProfileContext.c b/java/src/c/com_entrouvert_lasso_LassoProfile.c index 0315e135..8f1cb94c 100644 --- a/java/src/c/com_entrouvert_lasso_LassoProfileContext.c +++ b/java/src/c/com_entrouvert_lasso_LassoProfile.c @@ -24,103 +24,103 @@ #include <helper.h> #include <lasso/lasso.h> -#include <com_entrouvert_lasso_LassoProfileContext.h> +#include <com_entrouvert_lasso_LassoProfile.h> -JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfileContext_getMsgBody +JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfile_getMsgBody (JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; + LassoProfile * profile; char * result; - profileContext = getCObject(env, this); + profile = getCObject(env, this); - result = profileContext->msg_body; + result = profile->msg_body; return (*env)->NewStringUTF(env, result); } -JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfileContext_getMsgRelayState +JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfile_getMsgRelayState (JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; + LassoProfile * profile; char * result; - profileContext = getCObject(env, this); + profile = getCObject(env, this); - result = profileContext->msg_relayState; + result = profile->msg_relayState; return (*env)->NewStringUTF(env, result); } -JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfileContext_getMsgUrl +JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfile_getMsgUrl (JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; + LassoProfile * profile; char * result; - profileContext = getCObject(env, this); + profile = getCObject(env, this); - result = profileContext->msg_url; + result = profile->msg_url; return (*env)->NewStringUTF(env, result); } -JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfileContext_getNameIdentifier +JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfile_getNameIdentifier (JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; + LassoProfile * profile; char *result; - profileContext = getCObject(env, this); + profile = getCObject(env, this); - result = profileContext->nameIdentifier; + result = profile->nameIdentifier; if (result == NULL) return NULL; return (*env)->NewStringUTF(env, result); } -JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfileContext_getProviderID +JNIEXPORT jstring JNICALL Java_com_entrouvert_lasso_LassoProfile_getProviderID (JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; + LassoProfile * profile; char * result; - profileContext = getCObject(env, this); + profile = getCObject(env, this); - result = profileContext->remote_providerID; + result = profile->remote_providerID; return (*env)->NewStringUTF(env, result); } -JNIEXPORT jint JNICALL Java_com_entrouvert_lasso_LassoProfileContext_getRequestType +JNIEXPORT jint JNICALL Java_com_entrouvert_lasso_LassoProfile_getRequestType (JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; + LassoProfile * profile; char * result; - profileContext = getCObject(env, this); + profile = getCObject(env, this); - return profileContext->request_type; + return profile->request_type; } -JNIEXPORT jint JNICALL Java_com_entrouvert_lasso_LassoProfileContext_getResponseType +JNIEXPORT jint JNICALL Java_com_entrouvert_lasso_LassoProfile_getResponseType (JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; + LassoProfile * profile; char * result; - profileContext = getCObject(env, this); + profile = getCObject(env, this); - return profileContext->response_type; + return profile->response_type; } -JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfileContext_initRequestField +JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfile_initRequestField (JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; + LassoProfile * profile; char * fieldName = "request"; char * fieldType = "Lcom/entrouvert/lasso/LassoNode;"; char * javaObjectClassName = "com/entrouvert/lasso/LassoNode"; LassoNode *cObject; - profileContext = getCObject(env, this); - cObject = profileContext->request; + profile = getCObject(env, this); + cObject = profile->request; - if (profileContext->request_type == lassoMessageTypeAuthnRequest) { + if (profile->request_type == lassoMessageTypeAuthnRequest) { javaObjectClassName = "com/entrouvert/lasso/LassoAuthnRequest"; - } else if(profileContext->request_type == lassoMessageTypeRequest) { + } else if(profile->request_type == lassoMessageTypeRequest) { javaObjectClassName = "com/entrouvert/lasso/LassoRequest"; } else { /* FIXME: Throw error */ @@ -128,20 +128,20 @@ JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfileContext_initRequest checkAndSetField(env, this, fieldName, fieldType, javaObjectClassName, cObject); } -JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfileContext_initResponseField +JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfile_initResponseField (JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; + LassoProfile * profile; char * fieldName = "response"; char * fieldType = "Lcom/entrouvert/lasso/LassoNode;"; char * javaObjectClassName = "com/entrouvert/lasso/LassoNode"; LassoNode *cObject; - profileContext = getCObject(env, this); - cObject = profileContext->response; + profile = getCObject(env, this); + cObject = profile->response; - if(profileContext->response_type == lassoMessageTypeAuthnResponse){ + if(profile->response_type == lassoMessageTypeAuthnResponse){ javaObjectClassName = "com/entrouvert/lasso/LassoAuthnResponse"; - }else if(profileContext->response_type == lassoMessageTypeResponse){ + }else if(profile->response_type == lassoMessageTypeResponse){ javaObjectClassName = "com/entrouvert/lasso/LassoResponse"; }else{ /* FIXME: Throw error */ @@ -150,43 +150,43 @@ JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfileContext_initRespons checkAndSetField(env, this, fieldName, fieldType, javaObjectClassName, cObject); } -JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfileContext_initServerField +JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfile_initServerField (JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; + LassoProfile * profile; char * fieldName = "server"; char * fieldType = "Lcom/entrouvert/lasso/LassoServer;"; char * javaObjectClassName = "com/entrouvert/lasso/LassoServer"; LassoServer *cObject; - profileContext = getCObject(env, this); - cObject = profileContext->server; + profile = getCObject(env, this); + cObject = profile->server; checkAndSetField(env, this, fieldName, fieldType, javaObjectClassName, cObject); } -JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfileContext_initUserField +JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoProfile_initUserField (JNIEnv * env, jobject this){ - LassoProfileContext * profileContext; + LassoProfile * profile; char * fieldName = "user"; char * fieldType = "Lcom/entrouvert/lasso/LassoUser;"; char * javaObjectClassName = "com/entrouvert/lasso/LassoUser"; LassoUser *cObject; - profileContext = getCObject(env, this); - cObject = profileContext->user; + profile = getCObject(env, this); + cObject = profile->user; checkAndSetField(env, this, fieldName, fieldType, javaObjectClassName, cObject); } -JNIEXPORT jint JNICALL Java_com_entrouvert_lasso_LassoProfileContext_setUserFromDump +JNIEXPORT jint JNICALL Java_com_entrouvert_lasso_LassoProfile_setUserFromDump (JNIEnv * env, jobject this, jstring _dump) { int result; - LassoProfileContext *profileContext; + LassoProfile *profile; char *dump; - profileContext = getCObject(env, this); + profile = getCObject(env, this); dump = (char*)(*env)->GetStringUTFChars(env, _dump, NULL); - result = lasso_profile_context_set_user_from_dump(profileContext, dump); + result = lasso_profile_set_user_from_dump(profile, 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/LassoProfileContext.java b/java/src/java/com/entrouvert/lasso/LassoProfile.java index 6fff87ae..02e1c590 100644 --- a/java/src/java/com/entrouvert/lasso/LassoProfileContext.java +++ b/java/src/java/com/entrouvert/lasso/LassoProfile.java @@ -24,7 +24,7 @@ package com.entrouvert.lasso; -public abstract class LassoProfileContext extends LassoObject { // LassoProfileContext +public abstract class LassoProfile extends LassoObject { // LassoProfile protected LassoNode request = null; protected LassoNode response = null; protected LassoServer server = null; @@ -74,4 +74,4 @@ public abstract class LassoProfileContext extends LassoObject { // LassoProfileC native public int setUserFromDump(String userDump); -} // LassoProfileContext +} // LassoProfile 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') |