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
Add “auth_proxy” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'auth_proxy', ]
Run python manage.py migrate to create the auth_proxy model.
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
Built Distribution
Hashes for django_user_proxy-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6ae4fcc631ad0206a7f9b416d278d5eaf2919b41e4bb67e87acdaf62ca47587 |
|
MD5 | a7c4396a75a1c0adee9f8e4774efb57f |
|
BLAKE2b-256 | 4742cc751d1eef36e4c858255302ab3853c27cf58ff0375179d3d5fddfad3906 |