https://github.com/zotonic/zotonic_mod_access_url
Zotonic module for giving access to urls by signing the url with user credentials.
https://github.com/zotonic/zotonic_mod_access_url
Last synced: 2 months ago
JSON representation
Zotonic module for giving access to urls by signing the url with user credentials.
- Host: GitHub
- URL: https://github.com/zotonic/zotonic_mod_access_url
- Owner: zotonic
- License: apache-2.0
- Created: 2020-11-25T16:48:19.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2026-02-06T16:13:16.000Z (5 months ago)
- Last Synced: 2026-02-07T00:16:27.486Z (5 months ago)
- Language: Erlang
- Size: 40 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
mod_access_url
==============
Zotonic module for giving access to urls by signing the url with user credentials.
**This module needs Zotonic 1.0 or newer**
URLs are signed using a user specific secret. This secret is stored in the `identity` table.
Accessing a signed url gives access to that *single request* using all the access permissions of the signing user.
Only that single url will be accessible, any other url or request will use the credentials of the requesting user.
URLs signed by this module look like this:
https://example.com/en/page/20652?z_access_url=true&z_access_url_token=jRM4PvTUU65aExNCisCG&z_access_url_nonce=MHbsQAUPdTS1U3oTgO8B&z_access_url_sig=IQ00Vrmn1D0JGjKegKeP%2FfCoS%2F40XI%2BC2xrqO4xPP%2FA%3D
In the template it can be created by adding the `z_access_url` argument:
{% url page id=20652 z_access_url %}
The `z_access_url` argument is picked up by `mod_access_url` which then signs the generated url with the `z_access_url_nonce`, `z_access_url_token` and `z_access_url_sig` arguments. Note that there must be an authenticated user to be able to sign an url.