Skip to main content

REST Authentication Service

Beta License: LGPL-3 OCA/rest-framework Translate me on Weblate Try me on Runbot

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

14.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

Authors

  • Wakari

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

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.

Metadata

Release files for odoo14-addon-base-rest-auth-user-service 14.0.1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo14-addon-base-rest-auth-user-service 14.0.1.1.0
File Interpreter ABI Platform Actions
odoo14_addon_base_rest_auth_user_service-14.0.1.1.0-py3-none-any.whl Python 3 none any Details for odoo14_addon_base_rest_auth_user_service-14.0.1.1.0-py3-none-any.whl

Release files / odoo14_addon_base_rest_auth_user_service-14.0.1.1.0-py3-none-any.whl

Download URL odoo14_addon_base_rest_auth_user_service-14.0.1.1.0-py3-none-any.whl
Size 25.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e85fd115c68ae5402ed621fa8b7e323241f7c9d14ecb98f4106a462ab0e2d590
BLAKE2b-256 checksum
How to use checksums
e112c8d7faf714cf43d8e5e5490bc5757f771323b99b980ae39ed94ab61d9c72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.3.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.5

Security for odoo14-addon-base-rest-auth-user-service 14.0.1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page