@@ -10,7 +10,7 @@ The UsernameToken supports both the passwordText and passwordDigest methods::
1010 >>> from zeep import Client
1111 >>> from zeep.wsse.username import UsernameToken
1212 >>> client = Client(
13- ... 'http://www.webservicex.net/ConvertSpeed.asmx?WSDL',
13+ ... 'http://www.webservicex.net/ConvertSpeed.asmx?WSDL',
1414 ... wsse=UsernameToken('username', 'password'))
1515
1616To use the passwordDigest method you need to supply `use_digest=True ` to the
@@ -21,26 +21,38 @@ Signature (x509)
2121----------------
2222
2323To use the wsse.Signature() plugin you will need to install the `xmlsec `_
24- module. See the `README `_ for xmlsec for the required dependencies on your
24+ module. See the `README `_ for xmlsec for the required dependencies on your
2525platform.
2626
2727To append the security token as `BinarySecurityToken `, you can use wsse.BinarySignature() plugin.
2828
29+ To skip response signature verification set `verify_reply_signature=False `
30+
31+ To configure different certificate for response verify process, set `response_key_file ` or
32+ and `response_certfile `.
33+
2934Example usage A::
3035
3136 >>> from zeep import Client
3237 >>> from zeep.wsse.signature import Signature
3338 >>> client = Client(
34- ... 'http://www.webservicex.net/ConvertSpeed.asmx?WSDL',
39+ ... 'http://www.webservicex.net/ConvertSpeed.asmx?WSDL',
3540 ... wsse=Signature(
36- ... private_key_filename, public_key_filename,
41+ ... private_key_filename, public_key_filename,
3742 ... optional_password))
3843
44+ Example usage B::
3945
40- To skip response signature verification set `verify_reply_signature=False `
41-
42- To configure different certificate for response verify proces set `response_key_file ` or
43- and `response_certfile `.
46+ >>> from zeep import Client
47+ >>> from zeep.wsse.signature import Signature
48+ >>> from zeep.transports import Transport
49+ >>> from requests import Session
50+ >>> session = Session()
51+ >>> session.cert = '/path/to/ssl.pem'
52+ >>> transport = Transport(session=session)
53+ >>> client = Client(
54+ ... 'http://www.webservicex.net/ConvertSpeed.asmx?WSDL',
55+ ... transport=transport)
4456
4557.. _xmlsec : https://pypi.python.org/pypi/xmlsec
4658.. _README : https://github.com/mehcode/python-xmlsec
0 commit comments