Django users Microservice
Project description
================== users-microservice
users-microservice is a django microservice build for user authentication and verification.
Detailed documentation is in the "docs" directory.
Quick start
-
Add "users-microservice" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [ ... 'users-microservice', ]
-
Include the following to all the settings files in you microservice structure::
Authentication parameters shared_security is our SDK package name, this param tell the SDK which user model to use
AUTH_USER_MODEL = 'shared_security.User'
this is the table name in the database for our users model
AUTH_USER_TABLE = 'users_user'
this is the name of the database holding the users model
AUTH_DB = 'primary_db' DATABASE_ROUTERS = ['shared_security.dbrouter.AuthRouter'] DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'HOST': os.getenv('DB_HOST'), 'PORT': int(os.getenv('DB_PORT', 3306)), 'USER': os.getenv('DB_USER'), 'PASSWORD': os.getenv('DB_PASSWORD'), 'NAME': os.getenv('DB_NAME') }, 'primary_db': { 'ENGINE': 'django.db.backends.mysql', 'HOST': os.getenv('DB_HOST'), 'PORT': int(os.getenv('DB_PORT', 3306)), 'USER': os.getenv('DB_USER'), 'PASSWORD': os.getenv('DB_PASSWORD'), 'NAME': 'primary', } }
Change all the 'shared_security' paramaters with the naming you use.
-
Run
python manage.py migrate
. -
Start the development server and visit http://127.0.0.1:8000/
Project details
Release history Release notifications | RSS feed
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 users_microservice-0.2.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ef13e7cecced169a3126f53c1e4c368f43e49adfc2bdac910ee419b505d6afd |
|
MD5 | 8ff8c9681502bcdbe13c88cc481cdba8 |
|
BLAKE2b-256 | 72db19f94d222b870e2b27c01b74cf2b4ed43f70c22c8727b9340bcd71054ad8 |