Login/logout from session using a REST call
Project description
This module adds API endpoints to deal with session authentication and logout.
Table of contents
Usage
Authentication
To authenticate you need to POST
a request on [ODOO HOST]/session/auth/login
with the
following body:
{ "db": [DB_NAME], "login": [LOGIN], "password": [PASSWORD] }
"db"
is not mandatory if Odoo is able to determine it unequivocally (e.g. single database server or
dbfilter
parameter). If the authentication is successful, the response will contain (in addition to the usual
response of the JSON-RPC authentication):
{ ... "session": { "sid": "ff6b4bac7a590e7960abfc0ac38361433ecac1d6", "expires_at": "2021-09-21 16:53:56" } }
This sid
value can then be sent in subsequent requests in the following ways:
header
X-Openerp-Session-Id
cookie named session_id
request param session_id
Logout
To logout you need to POST
a request on [ODOO HOST]/session/auth/logout
with an empty body.
Changelog
13.0.1.0.0
First official version.
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
François Degrave <f.degrave@wakari.be>
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
This module is part of the OCA/rest-framework project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
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 Distributions
Built Distribution
File details
Details for the file odoo13_addon_base_rest_auth_user_service-13.0.1.0.1-py3-none-any.whl
.
File metadata
- Download URL: odoo13_addon_base_rest_auth_user_service-13.0.1.0.1-py3-none-any.whl
- Upload date:
- Size: 25.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/58.0.2 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79a7b841e65c27ecd13b09d5a1865f76fa6fcc87c35d15062f1086ae342af7e8 |
|
MD5 | 657e1be8e99b30e602f02e9b221a3bd3 |
|
BLAKE2b-256 | 208af16d86a67f8b223f86ac082872cc5ed34479817bea892f0e480c46374998 |