diff options
| author | Nicolas Clapies <nclapies@entrouvert.com> | 2004-07-21 12:44:33 +0000 |
|---|---|---|
| committer | Nicolas Clapies <nclapies@entrouvert.com> | 2004-07-21 12:44:33 +0000 |
| commit | 1d7b3791454b797bfd8d5dc72600b6932a16552d (patch) | |
| tree | 4081f2bb056518fbe6974c9df7f68ba8e7cb7041 /python | |
| parent | ddf6dd5516e6dbf778968c7fd97ba094c115d36b (diff) | |
| download | lasso-1d7b3791454b797bfd8d5dc72600b6932a16552d.tar.gz lasso-1d7b3791454b797bfd8d5dc72600b6932a16552d.tar.xz lasso-1d7b3791454b797bfd8d5dc72600b6932a16552d.zip | |
add list of identity provider id in user environ
Diffstat (limited to 'python')
| -rw-r--r-- | python/environs/py_user.c | 8 | ||||
| -rw-r--r-- | python/environs/py_user.h | 2 | ||||
| -rw-r--r-- | python/examples/logout-from-idp.py | 4 | ||||
| -rw-r--r-- | python/examples/logout.py | 4 | ||||
| -rw-r--r-- | python/examples/user.py | 4 | ||||
| -rw-r--r-- | python/lasso.py | 4 | ||||
| -rw-r--r-- | python/lassomod.c | 16 |
7 files changed, 21 insertions, 21 deletions
diff --git a/python/environs/py_user.c b/python/environs/py_user.c index e182f643..92f66b7e 100644 --- a/python/environs/py_user.c +++ b/python/environs/py_user.c @@ -126,17 +126,17 @@ PyObject *user_get_assertion(PyObject *self, PyObject *args) { return (LassoNode_wrap(assertion_node)); } -PyObject *user_get_next_providerID(PyObject *self, PyObject *args) { +PyObject *user_get_next_assertion_remote_providerID(PyObject *self, PyObject *args) { PyObject *user_obj; gchar *remote_providerID; - if (CheckArgs(args, "O:user_get_next_providerID")) { - if(!PyArg_ParseTuple(args, (char *) "O:user_get_next_providerID", &user_obj, &remote_providerID)) + if (CheckArgs(args, "O:user_get_next_assertion_remote_providerID")) { + if(!PyArg_ParseTuple(args, (char *) "O:user_get_next_assertion_remote_providerID", &user_obj, &remote_providerID)) return NULL; } else return NULL; - remote_providerID = lasso_user_get_next_providerID(LassoUser_get(user_obj)); + remote_providerID = lasso_user_get_next_assertion_remote_providerID(LassoUser_get(user_obj)); if(remote_providerID==NULL){ Py_INCREF(Py_None); return (Py_None); diff --git a/python/environs/py_user.h b/python/environs/py_user.h index fa752e06..b3d253c5 100644 --- a/python/environs/py_user.h +++ b/python/environs/py_user.h @@ -43,7 +43,7 @@ PyObject *user_add_assertion(PyObject *self, PyObject *args); PyObject *user_destroy(PyObject *self, PyObject *args); PyObject *user_dump(PyObject *self, PyObject *args); PyObject *user_get_assertion(PyObject *self, PyObject *args); -PyObject *user_get_next_providerID(PyObject *self, PyObject *args); +PyObject *user_get_next_assertion_remote_providerID(PyObject *self, PyObject *args); PyObject *user_remove_assertion(PyObject *self, PyObject *args); #endif /* __PYLASSO_PY_USER_H__ */ diff --git a/python/examples/logout-from-idp.py b/python/examples/logout-from-idp.py index 3732cc0e..38266d44 100644 --- a/python/examples/logout-from-idp.py +++ b/python/examples/logout-from-idp.py @@ -32,7 +32,7 @@ print user.dump() # requests : logout = lasso.Logout.new(server, user, lasso.providerTypeIdp); -next_provider_id = user.get_next_providerID(); +next_provider_id = user.get_next_assertion_remote_providerID(); while(next_provider_id): assertion = user.get_assertion(next_provider_id) @@ -44,7 +44,7 @@ while(next_provider_id): print 'body : ', logout.msg_body user.remove_assertion(next_provider_id) - next_provider_id = user.get_next_providerID() + next_provider_id = user.get_next_assertion_remote_providerID() print "End of logout ..." print "Dump of user environ :" diff --git a/python/examples/logout.py b/python/examples/logout.py index faa31e4b..6dcbecce 100644 --- a/python/examples/logout.py +++ b/python/examples/logout.py @@ -13,13 +13,13 @@ spserver = lasso.Server.new("../../examples/sp.xml", spserver.add_provider("../../examples/idp.xml", None, None) spserver.add_provider("../../examples/idp2.xml", None, None) -spuser_dump = "<LassoUser><LassoIdentities><LassoIdentity RemoteProviderID=\"https://identity-provider:2003/liberty-alliance/metadata\"><LassoLocalNameIdentifier><NameIdentifier NameQualifier=\"qualifier.com\" Format=\"federated\">11111111111111111111111111</NameIdentifier></LassoLocalNameIdentifier></LassoIdentity><LassoIdentity RemoteProviderID=\"https://identity-provider2:2003/liberty-alliance/metadata\"><LassoLocalNameIdentifier><NameIdentifier NameQualifier=\"qualifier.com\" Format=\"federated\">22222222222222222222222222</NameIdentifier></LassoLocalNameIdentifier></LassoIdentity></LassoIdentities></LassoUser>" +spuser_dump = "<LassoUser><LassoAssertions><LassoAssertion RemoteProviderID=\"https://identity-provider:2003/liberty-alliance/metadata\"><Assertion AssertionID=\"CD8SCD7SC6SDCD5CDSDCD88SDCDSD\"></Assertion></LassoAssertion></LassoAssertions><LassoIdentities><LassoIdentity RemoteProviderID=\"https://identity-provider:2003/liberty-alliance/metadata\"><LassoLocalNameIdentifier><NameIdentifier NameQualifier=\"qualifier.com\" Format=\"federated\">11111111111111111111111111</NameIdentifier></LassoLocalNameIdentifier></LassoIdentity><LassoIdentity RemoteProviderID=\"https://identity-provider2:2003/liberty-alliance/metadata\"><LassoLocalNameIdentifier><NameIdentifier NameQualifier=\"qualifier.com\" Format=\"federated\">22222222222222222222222222</NameIdentifier></LassoLocalNameIdentifier></LassoIdentity></LassoIdentities></LassoUser>" spuser = lasso.User.new_from_dump(spuser_dump) # LogoutRequest : splogout = lasso.Logout.new(spserver, spuser, lasso.providerTypeSp) -splogout.init_request("https://identity-provider:2003/liberty-alliance/metadata") +splogout.init_request() splogout.build_request_msg() request_msg = splogout.msg_body diff --git a/python/examples/user.py b/python/examples/user.py index ee9f8cfe..6fd5de1a 100644 --- a/python/examples/user.py +++ b/python/examples/user.py @@ -18,7 +18,7 @@ user = lasso.User.new_from_dump(user_dump); print "Dump of user environ : %s\n" % user.dump() -next_provider_id = user.get_next_providerID() +next_provider_id = user.get_next_assertion_remote_providerID() while(next_provider_id): print "Next provider id : ", next_provider_id assertion = user.get_assertion(next_provider_id) @@ -26,7 +26,7 @@ while(next_provider_id): print "Remove his assertion from user ..." user.remove_assertion(next_provider_id) - next_provider_id = user.get_next_providerID() + next_provider_id = user.get_next_assertion_remote_providerID() print "All assertions deleted\n" diff --git a/python/lasso.py b/python/lasso.py index dd8690c9..71e170f8 100644 --- a/python/lasso.py +++ b/python/lasso.py @@ -861,8 +861,8 @@ class User: def get_assertion(self, providerID): return Node(lassomod.user_get_assertion(self, providerID)) - def get_next_providerID(self): - return lassomod.user_get_next_providerID(self) + def get_next_assertion_remote_providerID(self): + return lassomod.user_get_next_assertion_remote_providerID(self) def remove_assertion(self, providerID): lassomod.user_remove_assertion(self, providerID) diff --git a/python/lassomod.c b/python/lassomod.c index 81c9c92c..ac6439fe 100644 --- a/python/lassomod.c +++ b/python/lassomod.c @@ -258,14 +258,14 @@ static PyMethodDef lasso_methods[] = { {"server_dump", server_dump, METH_VARARGS}, /* py_user.h */ - {"user_new", user_new, METH_VARARGS}, - {"user_new_from_dump", user_new_from_dump, METH_VARARGS}, - {"user_add_assertion", user_add_assertion, METH_VARARGS}, - {"user_destroy", user_destroy, METH_VARARGS}, - {"user_dump", user_dump, METH_VARARGS}, - {"user_get_assertion", user_get_assertion, METH_VARARGS}, - {"user_get_next_providerID", user_get_next_providerID, METH_VARARGS}, - {"user_remove_assertion", user_remove_assertion, METH_VARARGS}, + {"user_new", user_new, METH_VARARGS}, + {"user_new_from_dump", user_new_from_dump, METH_VARARGS}, + {"user_add_assertion", user_add_assertion, METH_VARARGS}, + {"user_destroy", user_destroy, METH_VARARGS}, + {"user_dump", user_dump, METH_VARARGS}, + {"user_get_assertion", user_get_assertion, METH_VARARGS}, + {"user_get_next_assertion_remote_providerID", user_get_next_assertion_remote_providerID, METH_VARARGS}, + {"user_remove_assertion", user_remove_assertion, METH_VARARGS}, {NULL, NULL} /* End of Methods Sentinel */ }; |
