Package org.ametys.core.captcha
Class AbstractCaptcha
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.captcha.AbstractCaptcha
- All Implemented Interfaces:
Captcha
,LogEnabled
,PluginAware
,Configurable
- Direct Known Subclasses:
JCaptcha
,ReCaptchaEnterprise
,ReCaptchaV2
public abstract class AbstractCaptcha
extends AbstractLogEnabled
implements PluginAware, Configurable, Captcha
Abstract class for Captchas to handle common methods such as retrieving wanted xsl file
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) Get the list of config parameters referenced by this captcha implementationgetId()
Get the Captcha type idGet the scss fileGet the helper xsl filevoid
setPluginInfo
(String pluginName, String featureName, String id) Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.core.captcha.Captcha
checkAndInvalidateCaptcha, getLabel, getLoginFailedBecauseCaptchaFailedLabel, getLoginFailedBecauseTooManyAttemptLabel, getUsedUrlPatterns, requireUserInteraction
-
Constructor Details
-
AbstractCaptcha
public AbstractCaptcha()
-
-
Method Details
-
setPluginInfo
Description copied from interface:PluginAware
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfo
in interfacePluginAware
- Parameters:
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this component
-
getId
Description copied from interface:Captcha
Get the Captcha type id -
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
getConfigParameters
Description copied from interface:Captcha
Get the list of config parameters referenced by this captcha implementation- Specified by:
getConfigParameters
in interfaceCaptcha
- Returns:
- list of parameters
-
getXSLHelperURL
Description copied from interface:Captcha
Get the helper xsl file- Specified by:
getXSLHelperURL
in interfaceCaptcha
- Returns:
- the source
- Throws:
SourceException
- if an error occurred while reading the xsl file
-
getLoginSCSSURL
Description copied from interface:Captcha
Get the scss file- Specified by:
getLoginSCSSURL
in interfaceCaptcha
- Returns:
- the source
- Throws:
SourceException
- if an error occurred while reading the xsl file
-