Minimal SAML2 client
Project description
MiniSAML
Absolutely minimalistic SAML 2 client. Does not support the full SAML 2 specification, on purpose. It only supports requests via HTTP Redirect and responses via HTTP POST.
Usage
Create a SAML Request
from minisaml.request import get_request_redirect_url
url = get_request_redirect_url(
saml_endpoint="https://your-idp.invalid/sso-endpoint/",
expected_audience="Your SAML Issuer",
acs_url="https://you.web-site.invalid/saml/acs/"
)
# This line depends on your web framework/server
redirect_user_to_url(url)
Validate and parse the SAML Response
from minisaml.response import validate_response
# This line depends on your web framework/server
saml_response = get_SAMLResponse_form_data_as_bytes()
# Load the x509 certificate as a cryptography.x509.Certificate somehow
certificate = ...
try:
response = validate_response(
data=saml_response,
certificate=certificate,
expected_audience="Your SAML Issuer",
idp_issuer="https://your-idp.invalid/issuer/"
)
except:
handle_invalid_response_somehow()
# response is a minisaml.response.Response object
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file minisaml-26.1.tar.gz.
File metadata
- Download URL: minisaml-26.1.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d92d6d1c5f340f7dae0f0e12528e268ae33735b2e7917e4fac5a51b782253f97
|
|
| MD5 |
00b37cdf33636247151e7dbfa1b5c239
|
|
| BLAKE2b-256 |
d9c78792a4af5d74954228fb66dc8e536739f7a3a2a95b77bdb17a08ad0a8004
|
Provenance
The following attestation bundles were made for minisaml-26.1.tar.gz:
Publisher:
release.yml on HENNGE/minisaml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
minisaml-26.1.tar.gz -
Subject digest:
d92d6d1c5f340f7dae0f0e12528e268ae33735b2e7917e4fac5a51b782253f97 - Sigstore transparency entry: 862011519
- Sigstore integration time:
-
Permalink:
HENNGE/minisaml@620a195830f74764060f6a26b471e80f7cb4d161 -
Branch / Tag:
refs/tags/26.1 - Owner: https://github.com/HENNGE
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@620a195830f74764060f6a26b471e80f7cb4d161 -
Trigger Event:
release
-
Statement type:
File details
Details for the file minisaml-26.1-py3-none-any.whl.
File metadata
- Download URL: minisaml-26.1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44d2a67c135f3a2053bc32e9be7825c2987b08fae775aaebb544dd523c0f692f
|
|
| MD5 |
eed1f19d39cf9cb9c39840916ced1f8b
|
|
| BLAKE2b-256 |
5b075b9293631e13acc9ab9056ac83c21ba149c11b40d9132757fd5b4ee424e0
|
Provenance
The following attestation bundles were made for minisaml-26.1-py3-none-any.whl:
Publisher:
release.yml on HENNGE/minisaml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
minisaml-26.1-py3-none-any.whl -
Subject digest:
44d2a67c135f3a2053bc32e9be7825c2987b08fae775aaebb544dd523c0f692f - Sigstore transparency entry: 862011571
- Sigstore integration time:
-
Permalink:
HENNGE/minisaml@620a195830f74764060f6a26b471e80f7cb4d161 -
Branch / Tag:
refs/tags/26.1 - Owner: https://github.com/HENNGE
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@620a195830f74764060f6a26b471e80f7cb4d161 -
Trigger Event:
release
-
Statement type: