cassyy
A simple Apereo Central Authentication Service (CAS) client that provides basic
support for validating service tickets using CAS Protocols 2/3. It uses the
Python standard library urllib.request module and has no external
dependencies.
Usage
Below provides just an example of how it might be used in a web
application. The example is generic and does not represent any specific web
framework. It is up to the application to decide what service_url it will
use with the build_login_url method. It is common to use the current request
url or a fixed url that CAS will redirect the user to after the login is
successful along with a ticket that can be validated to retrieve information
about the user.
import cassyy
cas_client = cassyy.CASClient.from_base_url('https://cas.example.org')
def login_route(request, response):
redirect_url = ...
target_url = cas_client.build_login_url(redirect_url)
response.redirect(target_url)
# This could be a route or some authentication middleware that intercepts
# unauthenticated requests and redirects to CAS and/or validates a CAS ticket
# if one is included in the request.
def validate_route(request, response):
ticket = ... # pull from request
service_url = ...
cas_user = cas_client.validate(service_url, ticket)
request.session['user'] = cas_user.asdict()
def logout_route(request, response):
# where to have CAS redirect back to the app after the CAS logout occurs,
# or None to use the CAS logout page
service_url = ...
target_url = cas_client.build_logout_url(service_url)
response.redirect(target_url)
Metadata
Release files for cassyy 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 |
|---|---|---|---|---|
| cassyy-1.0.1.tar.gz | 8.6 kB | Without provenance | Details for cassyy-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cassyy-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for cassyy-1.0.1-py3-none-any.whl |
Total release size: 17.0 kB
Release files / cassyy-1.0.1.tar.gz
| Download URL | cassyy-1.0.1.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96a1d94337434ef4a47aa39577314b0948bdd779c3ec1d593e815117361c7d0a
|
|
BLAKE2b-256 checksum How to use checksums |
6abe624caf6e2efcbced7a05895282825ad5d6abd5179abbb51077c7c6086707
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / cassyy-1.0.1-py3-none-any.whl
| Download URL | cassyy-1.0.1-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb9c1c21592dc47aaec6f5d71ed20a277bff9ca228a24130160c4cdd733b1f9f
|
|
BLAKE2b-256 checksum How to use checksums |
cdbac40faf54e82af66925a21fd190ffe5d8580942812c06776eeb75eae69987
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for cassyy 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.