Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ behavior can be altered by setting ``opportunistic_auth=True``:
.. code-block:: python

>>> import requests
>>> from requests_gssapi import HTTPSPNEGOAuth, REQUIRED
>>> gssapi_auth = HTTPSPNEGOAuth(mutual_authentication=REQUIRED, opportunistic_auth=True)
>>> from requests_gssapi import HTTPSPNEGOAuth
>>> gssapi_auth = HTTPSPNEGOAuth(opportunistic_auth=True)
>>> r = requests.get("https://windows.example.org/wsman", auth=gssapi_auth)
...

Expand All @@ -152,7 +152,7 @@ passing in a custom name (string or ``gssapi.Name``):
.. code-block:: python

>>> import requests
>>> from requests_gssapi import HTTPSPNEGOAuth, REQUIRED
>>> from requests_gssapi import HTTPSPNEGOAuth
>>> gssapi_auth = HTTPSPNEGOAuth(target_name="internalhost.local")
>>> r = requests.get("https://externalhost.example.org/", auth=gssapi_auth)
...
Expand All @@ -168,7 +168,7 @@ applicable). However, an explicit credential can be in instead, if desired.

>>> import gssapi
>>> import requests
>>> from requests_gssapi import HTTPSPNEGOAuth, REQUIRED
>>> from requests_gssapi import HTTPSPNEGOAuth
>>> name = gssapi.Name("user@REALM", gssapi.NameType.hostbased_service)
>>> creds = gssapi.Credentials(name=name, usage="initiate")
>>> gssapi_auth = HTTPSPNEGOAuth(creds=creds)
Expand All @@ -189,7 +189,7 @@ without interference. It is expected to be an instance of ``gssapi.mechs.Mechani
>>> import requests
>>> from requests_gssapi import HTTPSPNEGOAuth
>>> try:
... spnego = gssapi,mechs.Mechanism.from_sasl_name("SPNEGO")
... spnego = gssapi.mechs.Mechanism.from_sasl_name("SPNEGO")
... except AttributeError:
... spnego = gssapi.OID.from_int_seq("1.3.6.1.5.5.2")
>>> gssapi_auth = HTTPSPNEGOAuth(mech=spnego)
Expand Down