Package org.ametys.core.captcha
Interface Captcha
- All Known Implementing Classes:
AbstractCaptcha
,CaptchEtat
,CaptchEtat
,JCaptcha
,ReCaptchaEnterprise
,ReCaptchaV2
public interface Captcha
Interface for Captchas
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkAndInvalidateCaptcha
(String key, String value) Check if the Captcha is correctGet the list of config parameters referenced by this captcha implementationgetId()
Get the Captcha type idgetLabel()
Get the Captcha type labelGet the label to display when login has failed with this captchaGet the label to display when too many attempt have been doneGet the scss fileGet the minimal url patterns used by the captcha implementation.Get the helper xsl filedefault boolean
Indicate if the captcha requires user interaction and should be displayed as a form entry
-
Method Details
-
getLabel
Get the Captcha type label- Returns:
- the label
-
getId
Get the Captcha type id- Returns:
- the id
-
getConfigParameters
Get the list of config parameters referenced by this captcha implementation- Returns:
- list of parameters
-
checkAndInvalidateCaptcha
Check if the Captcha is correct- Parameters:
key
- the keyvalue
- the value- Returns:
- true if correct
-
getXSLHelperURL
Get the helper xsl file- Returns:
- the source
- Throws:
SourceException
- if an error occurred while reading the xsl file
-
getLoginSCSSURL
Get the scss file- Returns:
- the source
- Throws:
SourceException
- if an error occurred while reading the xsl file
-
getLoginFailedBecauseCaptchaFailedLabel
Get the label to display when login has failed with this captcha- Returns:
- the label
-
getLoginFailedBecauseTooManyAttemptLabel
Get the label to display when too many attempt have been done- Returns:
- the label
-
getUsedUrlPatterns
Get the minimal url patterns used by the captcha implementation. This is necessary to grant those url even when the user is not authentified (in particular to set a catpcha on the login page). Do no put a too wide range (such as ^.*$) since it may introduce security issues.- Returns:
- The minimal url patterns used by the captcha implementation.
-
requireUserInteraction
Indicate if the captcha requires user interaction and should be displayed as a form entry- Returns:
- true if the captcha requires user interaction
-