Repository
OCA/rest-framework · module folder · Try on Runboat
Module version
1.0.0
Category
Tools
Folder size
0.07 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/rest-framework
Last tracking update
2026-08-07 08:42:49
Authors
Akretion, Odoo Community Association (OCA)
Maintainers
Akretion, Odoo Community Association (OCA)
Committers
Weblate, Florian Mounier, OCA-git-bot, oca-ci
Odoo dependencies
OCA/rest-framework:
OCA/web-api:
Python dependencies
a2wsgi>=1.10.6, fastapi>=0.110.0, parse-accept-language, python-multipart, ujson
System dependencies
None
Required by
fastapi_captcha_altcha_backend
Description
This module provides a simple way to protect several fastapi endpoints routes with a
captcha.

It currently supports the following captcha providers:

- [Google reCAPTCHA](https://www.google.com/recaptcha)
- [hCaptcha](https://www.hcaptcha.com/)
- [Altcha](https://altcha.org/)

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
fastapi_endpoint_form_view fastapi.endpoint form Inherits fastapi.fastapi_endpoint_form_view
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (1)

New fields (6)
  • captcha_custom_verify_url Char
    help='Custom URL to use for the captcha verification'
  • captcha_minimum_score Float
    default=0.5 help='Minimum score to accept the captcha if a score is provided by the captcha service.'
  • captcha_routes_regex Char
    help='Regexes to match against routes url that should be protected by this captcha, comma separated. If empty, all routes will be protected'
  • captcha_secret_key Char
    groups='base.group_system' help='Secret key to use for the captcha validation'
  • captcha_type Selection
    help='Type of captcha to use for this endpoint' args: [('recaptcha', 'Recaptcha'), ('hcaptcha', 'Hcaptcha'), ('altcha', 'Altcha')]
  • use_captcha Boolean
    help='If checked, this endpoint will be protected by a captcha'
Public methods (1)
  • validate_captcha(self, captcha_response)
    Validate the captcha response.