Repository
OCA/server-tools · module folder · Try on Runboat
Module version
2.0.1
Category
Extra Tools
Folder size
0.69 MB
License
LGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/server-tools
Last tracking update
2026-08-07 07:17:48
Authors
Odoo Community Association (OCA), LasLabs
Maintainers
Odoo Community Association (OCA), LasLabs
Committers
GitHub, Akim Juillerat, Weblate, OCA Transbot, Dave Lasley, OCA-git-bot, oca-travis, Oleg Bulkin
Odoo dependencies
odoo/odoo:
- web
Python dependencies
pyotp
System dependencies
None
Required by
auth_totp_password_security
Description

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
mfa_login MFA Login Page ir.ui.view qweb New
res_users_authenticator_create_view_form MFA App/Device Creation Wizard res.users.authenticator.create form New
view_users_form User Form - MFA Settings res.users form Inherits base.view_users_form
view_users_form_simple_modif Change My Preferences - MFA Settings res.users form Inherits base.view_users_form_simple_modif
HTTP endpoints (3)
Route(s)HandlerAuthTypeMethodsFlags
/auth_totp/login AuthTotp.mfa_login_get public http GET website
/auth_totp/login AuthTotp.mfa_login_post none http POST sudo
(inherited route override) AuthTotp.web_login inherited http ALL
Models touched (3)

New fields (3)
  • authenticator_ids One2many → res.users.authenticator
    comodel_name='res.users.authenticator' help='To delete an authentication app, remove it from this list. To add a new authentication app, please use the button to the right. If the button is not present, you do not have the permissions to do this.' inverse_name='user_id' string='Authentication Apps/Devices'
  • mfa_enabled Boolean
    string='MFA Enabled?'
  • trusted_device_cookie_key Char
    compute='_compute_trusted_device_cookie_key' store=True
Public methods (3)
  • check(cls, db, uid, password)
    @classmethod
    Prevent auth caching for MFA users without active MFA session
  • check_credentials(self, password)
    @api.model
    Add MFA logic to core authentication process. Overview: * If user does not have MFA enabled, defer to parent logic. * If user has MFA enabled and has gone through MFA login process this session or has correct device cookie, defer to parent logic. * If neither of these is true, call parent logic. If successful, prevent auth while updating session to indicate that MFA login process can now commence.
  • validate_mfa_confirmation_code(self, confirmation_code)
    @api.multi

New fields (3)
  • name Char
    readonly=True required=True
  • secret_key Char
    readonly=True required=True
  • user_id Many2one → res.users
    comodel_name='res.users' ondelete='cascade'
Public methods (1)
  • validate_conf_code(self, confirmation_code)
    @api.multi

New fields (5)
  • confirmation_code Char
    help='Enter the latest six digit code generated by your authentication app' required=True string='Confirmation Code'
  • name Char
    help='A name that will help you remember this authentication app/device' index=True required=True string='Authentication App/Device Name'
  • qr_code_tag Html
    compute='_compute_qr_code_tag' help='Scan this image with your authentication app to add your account' string='QR Code'
  • secret_key Char
    default=<expr> required=True
  • user_id Many2one → res.users
    comodel_name='res.users' default=<expr> help='This is the user whose account the new authentication app/device will be tied to' index=True ondelete='cascade' readonly=True required=True string='Associated User'
Public methods (1)
  • action_create(self)
    @api.multi

Loading…

Loading…