diff options
| author | Valery Febvre <vfebvre at easter-eggs.com> | 2004-04-08 13:19:52 +0000 |
|---|---|---|
| committer | Valery Febvre <vfebvre at easter-eggs.com> | 2004-04-08 13:19:52 +0000 |
| commit | 3d2a99d2ba0096930515a32a682e918f3081c039 (patch) | |
| tree | f181cdf3093d99d3d16b6f185c27b6fdf2cf5ab2 /python | |
| parent | 5ab4384d35718496cf9eb93159dbdd0d15da63c1 (diff) | |
| download | lasso-3d2a99d2ba0096930515a32a682e918f3081c039.tar.gz lasso-3d2a99d2ba0096930515a32a682e918f3081c039.tar.xz lasso-3d2a99d2ba0096930515a32a682e918f3081c039.zip | |
*** empty log message ***
Diffstat (limited to 'python')
| -rwxr-xr-x | python/examples/test.py | 8 | ||||
| -rw-r--r-- | python/lasso_strings.py | 19 | ||||
| -rw-r--r-- | python/protocols/py_single_sign_on_and_federation.c | 18 |
3 files changed, 33 insertions, 12 deletions
diff --git a/python/examples/test.py b/python/examples/test.py index a7690348..aa32bdce 100755 --- a/python/examples/test.py +++ b/python/examples/test.py @@ -12,9 +12,9 @@ req = lasso.AuthnRequest("providerid.com", "true", "pp", # None "3", - None, - None, - "", # None + ["test"], + [], + "1", # None "encoded_RelayState", # None 0, None, @@ -24,6 +24,8 @@ req.node.dump("iso-8859-1", 1) query = req.node.url_encode(1, "../../examples/rsakey.pem") +print query + res = lasso.AuthnResponse(query, 1, "../../examples/rsapub.pem", "../../examples/rsakey2.pem", diff --git a/python/lasso_strings.py b/python/lasso_strings.py index 2ac7e1be..ee99425c 100644 --- a/python/lasso_strings.py +++ b/python/lasso_strings.py @@ -68,8 +68,6 @@ LibAuthnContextComparisonBetter = "better" # * StatusCodes */ LibStatusCodeFederationDoesNotExist = "lib:FederationDoesNotExist" LibStatusCodeNoPassive = "lib:NoPassive" -LibStatusCodeRequestDenied = "lib:RequestDenied" -LibStatusCodeSuccess = "lib:Success" # *****************************************************************************/ # * SAML */ @@ -79,3 +77,20 @@ LibStatusCodeSuccess = "lib:Success" SamlMajorVersion = "1" SamlMinorVersion = "0" +# * StatusCodes */ +SamlStatusCodeRequestDenied = "Samlp:RequestDenied" +SamlStatusCodeSuccess = "Samlp:Success" + +# * AuthenticationMethods */ +SamlAuthenticationMethodPassword = "urn:oasis:names:tc:SAML:1.0:am:password" +SamlAuthenticationMethodKerberos = "urn:ietf:rfc:1510" +SamlAuthenticationMethodSecureRemotePassword = "urn:ietf:rfc:2945" +SamlAuthenticationMethodHardwareToken = "urn:oasis:names:tc:SAML:1.0:am:HardwareToken" +SamlAuthenticationMethodSmartcardPki = "urn:ietf:rfc:2246" +SamlAuthenticationMethodSoftwarePki = "urn:oasis:names:tc:SAML:1.0:am:X509-PKI" +SamlAuthenticationMethodPGP = "urn:oasis:names:tc:SAML:1.0:am:PGP" +SamlAuthenticationMethodSPki = "urn:oasis:names:tc:SAML:1.0:am:SPKI" +SamlAuthenticationMethodXkms = "urn:oasis:names:tc:SAML:1.0:am:XKMS" +SamlAuthenticationMethodXmlSign = "urn:ietf:rfc:3075" +SamlAuthenticationMethodUnspecified = "urn:oasis:names:tc:SAML:1.0:am:unspecified" + diff --git a/python/protocols/py_single_sign_on_and_federation.c b/python/protocols/py_single_sign_on_and_federation.c index b9ccc3b5..bf62a039 100644 --- a/python/protocols/py_single_sign_on_and_federation.c +++ b/python/protocols/py_single_sign_on_and_federation.c @@ -78,8 +78,8 @@ PyObject *authn_request_create(PyObject *self, PyObject *args) { const xmlChar *isPassive; const xmlChar *protocolProfile; const xmlChar *assertionConsumerServiceID; - GPtrArray *authnContextClassRefs = NULL; - GPtrArray *authnContextStatementRefs = NULL; + //GPtrArray *authnContextClassRefs = NULL; + //GPtrArray *authnContextStatementRefs = NULL; const xmlChar *authnContextComparison; const xmlChar *relayState; gint proxyCount; @@ -91,9 +91,9 @@ PyObject *authn_request_create(PyObject *self, PyObject *args) { if(!PyArg_ParseTuple(args, (char *) "ssssssOOssiOs:authn_request_create", &providerID, &nameIDPolicy, &forceAuthn, &isPassive, &protocolProfile, &assertionConsumerServiceID, - &authnContextClassRefs, &authnContextStatementRefs, + &authnContextClassRefs_obj, &authnContextStatementRefs_obj, &authnContextComparison, &relayState, &proxyCount, - &idpList, &consent)) + &idpList_obj, &consent)) return NULL; request = lasso_authn_request_create(providerID, @@ -102,8 +102,8 @@ PyObject *authn_request_create(PyObject *self, PyObject *args) { isPassive, protocolProfile, assertionConsumerServiceID, - NULL, - NULL, + PythonStringList2_get(authnContextClassRefs_obj), + PythonStringList2_get(authnContextStatementRefs_obj), authnContextComparison, relayState, proxyCount, @@ -145,9 +145,13 @@ PyObject *authn_response_getattr(PyObject *self, PyObject *args) { reponse = lassoAuthnResponse_get(reponse_obj); if (!strcmp(attr, "__members__")) - return Py_BuildValue("[s]", "node"); + return Py_BuildValue("[sss]", "node", "isPassive", "mustAuthenticate"); if (!strcmp(attr, "node")) return (LassoNode_wrap(reponse->node)); + if (!strcmp(attr, "isPassive")) + return (int_wrap(reponse->isPassive)); + if (!strcmp(attr, "mustAuthenticate")) + return (int_wrap(reponse->mustAuthenticate)); Py_INCREF(Py_None); return (Py_None); |
