Implements RFC 7804 Salted Challenge Response (SCRAM) HTTP Authentication Mechanism for the Requests library.
Reason this release was yanked:
Broken
Project description
requests-scram
Implements RFC 7804 Salted Challenge Response (SCRAM) HTTP Authentication Mechanism for the Requests library.
See flask-scram for a server-side implementation.
Took much inspiration from requests-ntlm2 and requests-gssapi.
Getting Started
Initialize HTTPSCRAMAuth
and pass as the auth
parameter to your request or session:
import requests
from requests_scram import HTTPSCRAMAuth
# specify ``mechanisms`` for supported mechanisms (defaults to all non-PLUS)
auth = HTTPSCRAMAuth("user", "pass")
resp = requests.get("http://localhost:5000", auth=auth)
resp.raise_for_status()
print(resp.text)
Todo
- Handle multiple
WWW-Authenticate
headers (server would typically advertise multiple SCRAM authentication mechanisms) - Do something with
Authentication-Info
? - Implement One Round-Trip Reauthentication
License
Licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
requests-scram-1.0.0.tar.gz
(7.1 kB
view hashes)
Built Distribution
Close
Hashes for requests_scram-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0af49fea1030b4cd6f8efbf648d5cf71ecd48b60462d5963bf99ec30b9bdc696 |
|
MD5 | 8ebc13a9300b68d4d3a1f33e8699db7a |
|
BLAKE2b-256 | f41cb4e76087b9f535e51bf527f9772ba9d4efdefe452a24be079d1d024a1a77 |