Skip to main content

Middleware to allow to deny access to particular URLs

Project description

Middleware that applies Apache-like access control.

Add ``siteauth.middleware.SiteAuthenticationMiddleware`` after
``django.contrib.auth.middleware.AuthenticationMiddleware`` in
your ``MIDDLEWARE_CLASSES`` tuple.

Below are the settings:

- ``SITEAUTH_ACCESS_ORDER`` - either ``allow/deny`` or ``deny/allow``
- ``SITEAUTH_ALLOW_URLS`` - a list of regexes that explicitly allows
non-athenticated access
- ``SITEAUTH_DENY_URLS`` - a list of regexes that explicitly denies
non-authenticated access

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-siteauth-1.0.0.tar.gz (3.2 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page