DefaultModel
Magento\Captcha\Model\DefaultModel
What it does
This is the core CAPTCHA model that handles generation, validation, and session management of CAPTCHA challenges in Magento 2.
Developers use this class when implementing or customizing CAPTCHA functionality for forms, checking if CAPTCHA is required based on failed login attempts, and validating user-submitted CAPTCHA responses.
It tracks attempts by IP and login to determine when to show CAPTCHA based on configured thresholds.
Public Methods
- getBlockName()
- isRequired()
- isShownToLoggedInUser()
- isCaseSensitive()
- getFont()
- getExpiration()
- getTimeout()
- getImgDir()
- getImgUrl()
- isCorrect()
- getImgSrc()
- logAttempt()
- setShowCaptchaInSession()
- getWordLen()
- getWord()