Skip to content

Commit c90ea11

Browse files
sblcookfrozencemetery
authored andcommitted
Update README to include section on setup
Cherry-picked-from: requests-kerberos#131 [[email protected]: phrasing cleanups, commit message tweaks]
1 parent c09d1e3 commit c90ea11

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

README.rst

+17-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,26 @@ Basic GET usage:
2323
2424
The entire ``requests.api`` should be supported.
2525

26+
Setup
27+
-----
28+
29+
In order to use this library, there must already be a Kerberos Ticket-Granting
30+
Ticket (TGT) in a credential cache (ccache). Whether a TGT is available can
31+
be easily determined by running the ``klist`` command. If no TGT is
32+
available, then it first must be obtained (for instance, by running the
33+
``kinit`` command, or pointing the $KRB5CCNAME to a credential cache with a
34+
valid TGT).
35+
36+
In short, the library will handle the "negotiations" of Kerberos
37+
authentication, but ensuring that a credentials are available and valid is the
38+
responsibility of the user.
39+
2640
Authentication Failures
2741
-----------------------
2842

2943
Client authentication failures will be communicated to the caller by returning
30-
the 401 response.
44+
a 401 response. A 401 response may also be the result of expired credentials
45+
(including the TGT).
3146

3247
Mutual Authentication
3348
---------------------
@@ -119,7 +134,7 @@ no GSSAPI challenges are sent after the initial auth handshake. This
119134
behavior can be altered by setting ``opportunistic_auth=True``:
120135

121136
.. code-block:: python
122-
137+
123138
>>> import requests
124139
>>> from requests_gssapi import HTTPSPNEGOAuth, REQUIRED
125140
>>> gssapi_auth = HTTPSPNEGOAuth(mutual_authentication=REQUIRED, opportunistic_auth=True)

0 commit comments

Comments
 (0)