Skip to content

Latest commit

 

History

History
44 lines (23 loc) · 2.06 KB

File metadata and controls

44 lines (23 loc) · 2.06 KB
graph LR
    TwoFactorAuth_Model["TwoFactorAuth Model"]
    Device_Base_Class["Device Base Class"]
    PhoneDevice_Model["PhoneDevice Model"]
    TwoFactorAuth_Model -- "links to" --> Device_Base_Class
    PhoneDevice_Model -- "inherits from" --> Device_Base_Class
    TwoFactorAuth_Model -- "references" --> PhoneDevice_Model
Loading

CodeBoardingDemoContact

Details

The two-factor authentication subsystem is structured around a central TwoFactorAuth model (two_factor.models.TwoFactorAuth) that orchestrates a user's 2FA settings. This model interacts with a hierarchy of OTP device implementations, all stemming from the abstract Device base class (django_otp.models.Device). Concrete device types, such as the PhoneDevice (two_factor.plugins.phonenumber.models.PhoneDevice), extend this base class to provide specific authentication mechanisms like SMS-based OTP. This design allows for flexible integration of various 2FA methods while maintaining a consistent interface for managing user authentication.

TwoFactorAuth Model

Manages a user's 2FA configuration.

Related Classes/Methods:

Device Base Class

Abstract base class, defining the common interface for all OTP devices.

Related Classes/Methods:

PhoneDevice Model

Extends the Device base class to provide specific authentication methods (e.g., SMS-based OTP).

Related Classes/Methods: