Closed achapkowski closed 7 months ago
@jborean93 I wanted to follow up and see if you could provide an answer to this question?
Hi, really sorry I missed this one, the creds
kwarg is a gssapi credential object from the python-gssapi. To pass in an explicit username/password you need to use the extension method acquire_cred_with_password which may not be available on all implementations of GSSAPI.
import gssapi
import requests_gssapi
username = "..."
password = "..."
cred = gssapi.raw.acquire_cred_with_password(
gssapi.Name(username, gssapi.NameType.user),
password.encode("utf-8"),
mechs=[gssapi.OID.from_int_seq("1.2.840.113554.1.2.2")],
usage="initiate",
)
auth = requests_gssapi.HTTPSPNEGOAuth(creds=cred.creds)
What went wrong?
Can we please get more clarify/example on how to use the gssapi.Credentials?
creds
is GSSAPI credentials (gssapi.Credentials) to use for negotiation.Thank you