From 88f8a19b60c0835c21926cc0e99fbbccf8fe3621 Mon Sep 17 00:00:00 2001 From: Valery Febvre Date: Thu, 8 Apr 2004 14:59:36 +0000 Subject: *** empty log message *** --- .../protocols/py_single_sign_on_and_federation.c | 36 ++++++++++++++-------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'python/protocols') diff --git a/python/protocols/py_single_sign_on_and_federation.c b/python/protocols/py_single_sign_on_and_federation.c index bf62a039..a18b2ea7 100644 --- a/python/protocols/py_single_sign_on_and_federation.c +++ b/python/protocols/py_single_sign_on_and_federation.c @@ -73,22 +73,22 @@ PyObject *authn_request_create(PyObject *self, PyObject *args) { PyObject *authnContextClassRefs_obj, *authnContextStatementRefs_obj; PyObject *idpList_obj; const xmlChar *providerID; - const xmlChar *nameIDPolicy; - const xmlChar *forceAuthn; - const xmlChar *isPassive; - const xmlChar *protocolProfile; - const xmlChar *assertionConsumerServiceID; - //GPtrArray *authnContextClassRefs = NULL; - //GPtrArray *authnContextStatementRefs = NULL; - const xmlChar *authnContextComparison; - const xmlChar *relayState; + const xmlChar *nameIDPolicy = NULL; + gint forceAuthn; + gint isPassive; + const xmlChar *protocolProfile = NULL; + const xmlChar *assertionConsumerServiceID = NULL; + GPtrArray *authnContextClassRefs = NULL; + GPtrArray *authnContextStatementRefs = NULL; + const xmlChar *authnContextComparison = NULL; + const xmlChar *relayState = NULL; gint proxyCount; GPtrArray *idpList = NULL; - const xmlChar *consent; + const xmlChar *consent = NULL; lassoAuthnRequest *request; - if(!PyArg_ParseTuple(args, (char *) "ssssssOOssiOs:authn_request_create", + if(!PyArg_ParseTuple(args, (char *) "sziizz|O|OzziOz:authn_request_create", &providerID, &nameIDPolicy, &forceAuthn, &isPassive, &protocolProfile, &assertionConsumerServiceID, &authnContextClassRefs_obj, &authnContextStatementRefs_obj, @@ -96,14 +96,24 @@ PyObject *authn_request_create(PyObject *self, PyObject *args) { &idpList_obj, &consent)) return NULL; + if (authnContextClassRefs_obj != Py_None) { + authnContextClassRefs = PythonStringList2_get(authnContextClassRefs_obj); + } + if (authnContextStatementRefs_obj != Py_None) { + authnContextStatementRefs = PythonStringList2_get(authnContextStatementRefs_obj); + } + if (idpList_obj != Py_None) { + idpList = PythonStringList2_get(idpList_obj); + } + request = lasso_authn_request_create(providerID, nameIDPolicy, forceAuthn, isPassive, protocolProfile, assertionConsumerServiceID, - PythonStringList2_get(authnContextClassRefs_obj), - PythonStringList2_get(authnContextStatementRefs_obj), + authnContextClassRefs, + authnContextStatementRefs, authnContextComparison, relayState, proxyCount, -- cgit