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-Authenticateheaders (server would typically advertise multiple SCRAM authentication mechanisms) - Do something with
Authentication-Info? - Implement One Round-Trip Reauthentication
License
Licensed under the MIT License.
Metadata
Release files for requests-scram 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| requests-scram-1.0.1.tar.gz | 7.0 kB | Without provenance | Details for requests-scram-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| requests_scram-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for requests_scram-1.0.1-py3-none-any.whl |
Total release size: 11.2 kB
Release files / requests-scram-1.0.1.tar.gz
| Download URL | requests-scram-1.0.1.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62d562b9560ecdbe75e65887833e909404b1d668bba7572ad658db0f4c13567e
|
|
BLAKE2b-256 checksum How to use checksums |
824be5e0ad4bf1f544030f2516c440900765efc3704fc1f616e376c5eb6541ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / requests_scram-1.0.1-py3-none-any.whl
| Download URL | requests_scram-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ab7abcb523dda6a00a4696d582abde56a46022ba592a18c27067a33bd1101a6
|
|
BLAKE2b-256 checksum How to use checksums |
d08c2f36018fe1e1ef78f0d0d7eee27c192effd14e1d68f8dd31c91eccf31782
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for requests-scram 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.