Skip to main content

A django app model user proxy

Project description

AuthProxyApp is a Django app containing a single User Proxy model, which is shared between multiple Django instances.

The purpose of this Proxy model is to access a single shared “Users” database between Django applications, with no explicit foreign relations.

It currently operates with a modified User implementation featuring a UUID as a PK, you can easily implement this by creating your own AbstractUser implementation, and storing all users and permissions in a single “Users” database.

Quick start

  1. Add “auth_proxy” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'auth_proxy',
    ]
  2. Run python manage.py migrate to create the auth_proxy model.

  3. If you wish to use the included Middlewares, include them:

    MIDDLEWARE_CLASSES = (
        ...
        'auth_proxy.middleware.GenerateUserProxy',
        'auth_proxy.middleware.AddUserProxyToRequest'
    )

GenerateUserProxy will create the UserProxy on user login, and AddUserProxyToRequest will add the UserProxy to the request, where it can be obtained like this: request.user_proxy.

TODO

  • REST endpoints to manage UserProxy instances

  • Erase UserProxy instances when Users are deleted

BUILDING

Run python -m build

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-user-proxy-1.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_user_proxy-1.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file django-user-proxy-1.1.tar.gz.

File metadata

  • Download URL: django-user-proxy-1.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for django-user-proxy-1.1.tar.gz
Algorithm Hash digest
SHA256 ae24baded35eae1ccde9b72a0b3c320da8d7a431dbc4fe907a50fdf105c657bb
MD5 47e1ea278f87e5e5aac02f57823aba0c
BLAKE2b-256 d4901fbf043f28b05e17c0a12aa109f7e854b8902d3db2e8fc501a3c76ed7fdd

See more details on using hashes here.

File details

Details for the file django_user_proxy-1.1-py3-none-any.whl.

File metadata

  • Download URL: django_user_proxy-1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for django_user_proxy-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f6ae4fcc631ad0206a7f9b416d278d5eaf2919b41e4bb67e87acdaf62ca47587
MD5 a7c4396a75a1c0adee9f8e4774efb57f
BLAKE2b-256 4742cc751d1eef36e4c858255302ab3853c27cf58ff0375179d3d5fddfad3906

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page