python: add a classmethod for lasso.profileGetIssuer (#24831)
This commit is contained in:
parent
591acb5170
commit
eb6e0e23b4
6
FAQ.rst
6
FAQ.rst
|
@ -243,15 +243,15 @@ the message is sent using the SOAP, HTTP-POST or HTTP-Redirect bindings.
|
||||||
import lasso
|
import lasso
|
||||||
|
|
||||||
msg = request.POST['SAMLRequest']
|
msg = request.POST['SAMLRequest']
|
||||||
provider_id = lasso.profileGetIssuer(msg)
|
provider_id = lasso.Profile.getIssuer(msg)
|
||||||
|
|
||||||
# GET case
|
# GET case
|
||||||
msg = request.META['QUERY_STRING']
|
msg = request.META['QUERY_STRING']
|
||||||
provider_id = lasso.profileGetIssuer(msg)
|
provider_id = lasso.Profile.getIssuer(msg)
|
||||||
|
|
||||||
# SOAP case
|
# SOAP case
|
||||||
msg = request.read()
|
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
|
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.
|
you can retrieve a POST parameters, the query string or the POST body.
|
||||||
|
|
|
@ -258,6 +258,11 @@ class %sError(%sError):
|
||||||
def generate_footer(self, fd):
|
def generate_footer(self, fd):
|
||||||
print_('''
|
print_('''
|
||||||
|
|
||||||
|
def _profileGetIssuer(cls, *args, **kwargs):
|
||||||
|
return profileGetIssuer(*args, **kwargs)
|
||||||
|
|
||||||
|
Profile.getIssuer = classmethod(_profileGetIssuer)
|
||||||
|
|
||||||
import lasso
|
import lasso
|
||||||
|
|
||||||
# backward compatibility with the SWIG binding
|
# backward compatibility with the SWIG binding
|
||||||
|
|
Loading…
Reference in New Issue