Fastapi Auth Partner
This module is the FastAPI implementation of auth_partner it provides all the routes to manage the authentication of partners.
Table of contents
Usage
First you have to add the auth router to your FastAPI endpoint and the authentication dependency to your app dependencies:
from odoo.addons.fastapi import dependencies
from odoo.addons.fastapi_auth_partner.dependencies import (
auth_partner_authenticated_partner,
)
from odoo.addons.fastapi_auth_partner.routers.auth import auth_router
class FastapiEndpoint(models.Model):
_inherit = "fastapi.endpoint"
def _get_fastapi_routers(self):
if self.app == "myapp":
return [
auth_router,
]
return super()._get_fastapi_routers()
def _get_app_dependencies_overrides(self):
res = super()._get_app_dependencies_overrides()
if self.app == "myapp":
res.update(
{
dependencies.authenticated_partner_impl: auth_partner_authenticated_partner,
}
)
return res
Next you can manage your authenticable partners and directories in the Odoo interface:
FastAPI > Authentication > Partner
and
FastAPI > Authentication > Directory
Next you must set the directory used for the authentication in the FastAPI endpoint:
FastAPI > FastAPI Endpoint > myapp > Directory
Then you can use the auth router to authenticate your requests:
POST /auth/register to register a partner
POST /auth/login to authenticate a partner
POST /auth/logout to unauthenticate a partner
POST /auth/validate_email to validate a partner email
POST /auth/request_reset_password to request a password reset
POST /auth/set_password to set a new password
GET /auth/profile to get the partner profile
GET /auth/impersonate to impersonate a partner
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 to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
-
Sébastien Beau
Florian Mounier
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.
Metadata
Release files for odoo-addon-fastapi-auth-partner 18.0.1.0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| odoo_addon_fastapi_auth_partner-18.0.1.0.0.4-py3-none-any.whl | Python 3 | none | any | Details for odoo_addon_fastapi_auth_partner-18.0.1.0.0.4-py3-none-any.whl |
Release files / odoo_addon_fastapi_auth_partner-18.0.1.0.0.4-py3-none-any.whl
| Download URL | odoo_addon_fastapi_auth_partner-18.0.1.0.0.4-py3-none-any.whl |
|---|---|
| Size | 47.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
abaf5a6cb36810bee5734730f2e201bd874885d925e85a2ca1f6e22c2cc50f7f
|
|
BLAKE2b-256 checksum How to use checksums |
eb2d2c8de01fb2dc08d1d9a6078f766a1c0ecaad917b60ada176fa8ec196e145
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for odoo-addon-fastapi-auth-partner 18.0.1.0.0.4
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.