has_credential¶
- ciecplib.kerberos.has_credential(**store_kw)¶
Return
Trueif an active Kerberos (GSSAPI) credential is available.- Parameters:
store_kw – Keyword arguments to pass to the credentials store extension of the underlying GSSAPI implementation. See https://pythongssapi.github.io/python-gssapi/credstore.html for more details.
- Returns:
True – If a valid Kerberos credential is found with a lifetime of more than 1 second.
False – Otherwise.
Examples
>>> has_credential() False >>> has_credential( ... ccache="mykrb5cc", ... client_keytab="/home/user/.kerberos/me.keytab", ... ) True
Notes
This function will always return
Falseif the requests-gssapi Kerberos Auth plugin required by requests-ecp is not found.See also
gssapi.CredentialsFor more details on how credentials are accessed using Python-GSSAPI.