Custom django auth backend for authorization via odoo
Project description
django-odoo-auth
Custom django auth backend for authorization via odoo
Quick start
- install module
pip install django-odoo-auth
- Add odoo_auth to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
# ...
'odoo_auth',
]
- Add backend to your AUTHENTICATION_BACKENDS setting like this:
AUTHENTICATION_BACKENDS = (
# ...
'odoo_auth.backends.OdooBackend',
)
- Edit the information to connect to your server Odoo in
settings.py
:
ODOO_SERVER_URL = 'https://exmaple.com'
ODOO_SERVER_PORT = 443 # this optional
ODOO_SERVER_DBNAME = 'database'
- Run
python manage.py migrate
to create the odoo_auth models. - For call odoo_auth, use standard authenticate:
from django.contrib.auth import authenticate
user = authenticate(username='username', password='password')
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
File details
Details for the file django-odoo-auth-1.0.4.1.tar.gz
.
File metadata
- Download URL: django-odoo-auth-1.0.4.1.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9cd724c84fc179adb5bf30586d647ac198cedaf430746a3e7cf0ddc6d25df1d |
|
MD5 | 749f870b62b1a2e8be829b8bbf0449ce |
|
BLAKE2b-256 | b5dcc9fd3d1ccc533fe3c98743b9ebf3a25fc350199611382aa1bd0ad53a8feb |