diff --git a/FAQ.rst b/FAQ.rst index 1236145d..97d1f34b 100644 --- a/FAQ.rst +++ b/FAQ.rst @@ -243,15 +243,15 @@ the message is sent using the SOAP, HTTP-POST or HTTP-Redirect bindings. import lasso msg = request.POST['SAMLRequest'] - provider_id = lasso.profileGetIssuer(msg) + provider_id = lasso.Profile.getIssuer(msg) # GET case msg = request.META['QUERY_STRING'] - provider_id = lasso.profileGetIssuer(msg) + provider_id = lasso.Profile.getIssuer(msg) # SOAP case msg = request.read() - provider_id = lasso.profileGetIssuer(msg) + provider_id = lasso.Profile.getIssuer(msg) The python example is pseudo-code. It assumes there is a request object whom you can retrieve a POST parameters, the query string or the POST body. diff --git a/bindings/python/lang.py b/bindings/python/lang.py index 4ef79ead..22b7d028 100644 --- a/bindings/python/lang.py +++ b/bindings/python/lang.py @@ -258,6 +258,11 @@ class %sError(%sError): def generate_footer(self, fd): print_(''' +def _profileGetIssuer(cls, *args, **kwargs): + return profileGetIssuer(*args, **kwargs) + +Profile.getIssuer = classmethod(_profileGetIssuer) + import lasso # backward compatibility with the SWIG binding