Skip to main content

Important. This project has not been finished. It does not have the intended integration with https://github.com/zk-passport/openpassport/tree/main/sdk due to some errors encountered when creating the browser bundle of the said sdk.

A Django middleware for verifying the user's age before allowing them access to a resource. Developed for the purposes of the PSE Hackathon held in Sep 2024.

The user is expected to own an Android or iOS device with an NFC reader and a compatible passport.

Installation

  • pip install age_verification_psehack

In your Django project's settings.py:

Add the following line to the bottom of the MIDDLEWARE section:

  • "age_verification_psehack.middleware.AgeVerificationMiddleware"

Add the following line to the bottom of the INSTALLED_APPS section:

  • "age_verification_psehack.apps.AgeVerificationPSEHackConfig"

Add a new AGE_VERIFICATION_PATHS setting containing all paths requiring age verification:

  • AGE_VERIFICATION_PATHS = ['/protected_path1', '/protected/path2']

Usually all Django projects are already configured to serve static files. If yours is not configured, consult https://docs.djangoproject.com/en/4.2/howto/static-files/

Navigate to the root of your Django project and run:

  • python manage.py makemigrations age_verification_psehack
  • python manage.py migrate
  • python manage.py collectstatic

For developers only: testing local changes

In case if you need to make changes and test them, in the root of this repo run

  • python -m pip install build
  • python -m build

In the root of your Django project create a file requirements.txt with the following:

-e path/to/the/root/of/this/repo

Then run:

python -m pip install -r requirements.txt

Metadata

Release files for age-verification-psehack 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for age-verification-psehack 0.2.2
File Size Uploaded Provenance Actions
age_verification_psehack-0.2.2.tar.gz 5.5 kB Without provenance Details for age_verification_psehack-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for age-verification-psehack 0.2.2
File Interpreter ABI Platform Actions
age_verification_psehack-0.2.2-py3-none-any.whl Python 3 none any Details for age_verification_psehack-0.2.2-py3-none-any.whl

Total release size: 11.9 kB

Release files / age_verification_psehack-0.2.2.tar.gz

Download URL age_verification_psehack-0.2.2.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d5e3ed0dbc5720c72bae280d1ca44f1e44389e0b608341604ae4fc5c20786adf
BLAKE2b-256 checksum
How to use checksums
9324acdac8175ffd12c9e2435638298986430f82015eed579c0719c860045c72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.32.3 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

Release files / age_verification_psehack-0.2.2-py3-none-any.whl

Download URL age_verification_psehack-0.2.2-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e61f8142780a9a444f1bf99947cdf61ca05300b43d30cd4c882eca0df9cf8f9
BLAKE2b-256 checksum
How to use checksums
205561aba185fc2a45f0482b7575b389e6e9a535f7b0d3717d8f70066b1ae31a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.32.3 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

Security for age-verification-psehack 0.2.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page