summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-04-08 14:59:36 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-04-08 14:59:36 +0000
commit88f8a19b60c0835c21926cc0e99fbbccf8fe3621 (patch)
tree70e7f293a6e7222ff3865a3d90fc0db040b66107 /python
parentcb103717a65071aefc5b2c2265d53c453a325db1 (diff)
downloadlasso-88f8a19b60c0835c21926cc0e99fbbccf8fe3621.tar.gz
lasso-88f8a19b60c0835c21926cc0e99fbbccf8fe3621.tar.xz
lasso-88f8a19b60c0835c21926cc0e99fbbccf8fe3621.zip
*** empty log message ***
Diffstat (limited to 'python')
-rwxr-xr-xpython/examples/test.py8
-rw-r--r--python/protocols/py_single_sign_on_and_federation.c36
2 files changed, 27 insertions, 17 deletions
diff --git a/python/examples/test.py b/python/examples/test.py
index aa32bdce..b5bf8816 100755
--- a/python/examples/test.py
+++ b/python/examples/test.py
@@ -8,13 +8,13 @@ print lasso.init()
req = lasso.AuthnRequest("providerid.com",
"federated",
- "false",
- "true",
+ 0,
+ 1,
"pp", # None
"3",
["test"],
- [],
- "1", # None
+ None,
+ lasso.LibAuthnContextComparisonExact, # None
"encoded_RelayState", # None
0,
None,
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,