Skip to content
forked from pcdshub/krtc

Small utility for using Kerberos authentication with requests

License

Notifications You must be signed in to change notification settings

slacmshankar/krtc

This branch is 1 commit ahead of, 6 commits behind pcdshub/krtc:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5072df0 · Mar 29, 2023

History

65 Commits
Mar 7, 2023
Mar 8, 2023
Mar 7, 2023
Mar 29, 2023
Mar 7, 2023
Mar 7, 2023
Mar 7, 2023
Mar 7, 2023
Jan 17, 2018
Mar 7, 2023
Mar 7, 2023
Mar 7, 2023
Mar 7, 2023
Mar 17, 2020
May 6, 2022
Mar 7, 2023
Mar 7, 2023
Mar 7, 2023
Jan 18, 2018

Repository files navigation

krtc

This is a very small utility class for using Kerberos authentication with Python requests.

Installation

$ pip install lcls-krtc
$ conda install -c conda-forge krtc

Usage example

To use this when making calls to a web service:

import requests
from krtc import KerberosTicket
from urllib.parse import urlparse

ws_url = "https://ws.slac.stanford.edu/ws/getData.json"
krbheaders = KerberosTicket("HTTP@" + urlparse(ws_url).hostname).getAuthHeaders()
r = requests.get(ws_url, headers=krbheaders)
print(r.json())

About

Small utility for using Kerberos authentication with requests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%