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.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a65c413830780075ffea0be3d3c95dbd8d7d76543c90775b7f2ef64c4c3b2b2a |
|
MD5 | ac4bbda2d83af99f8222c6ebb5ac4459 |
|
BLAKE2b-256 | 9faf03c5442b2564163eeab4bd266c63cc10cf947ece30690e6d3d22cd78f792 |