Introduction
This is a modified Cookie Auth Plugin that only redirects if the UA is a browser. The main envisioned use case is for scenarios that require an API to be built for an existing client (that we have no control over) that does not expect redirects to login form upon authentication.
The detection is done by comparing the request User-Agent header against some of the most common browser user agent strings, ie. “Mozilla”, “Webkit”, “Opera”, and for the terminal users out there, “Lynx”.
Basic installation and use:
Go to Zope root acl_users folder via ZMI
Add a “Browser-only-redirecting Cookie Auth Helper”.
Go to “plugins” folder
Click “Challenge Plugins” to get to the plugin registry
Disable “credentials_cookie_auth” plugin
Add in its place the plugin (helper) you added in 2.
Make sure the plugin/helper you added is at the top so it’s given a chance to run first.
Then, try authenticating with wrong credentials. You should get a proper 401 Unauthorized response rather than the usual 302 Moved Temporarily (typically causing redirect).
Change history
Changelog
1.0dev (unreleased)
Initial release
Download
Metadata
Release files for koodaamo.pas.browseronlyredirect 1.0
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 |
|---|---|---|---|---|
| koodaamo.pas.browseronlyredirect-1.0.zip | 18.9 kB | Without provenance | Details for koodaamo.pas.browseronlyredirect-1.0.zip |
Release files / koodaamo.pas.browseronlyredirect-1.0.zip
| Download URL | koodaamo.pas.browseronlyredirect-1.0.zip |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3bb96b663867c6fc79678ca569ed40d00712ff5647d4f8e00e7f20b0fd0a2dc5
|
|
BLAKE2b-256 checksum How to use checksums |
991983c69c912f102174ae3db97480df448cf86b1d1b77d170f51f4709504cd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for koodaamo.pas.browseronlyredirect 1.0
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.