Interface CaptchaManager
-
- All Known Implementing Classes:
DefaultCaptchaManager
public interface CaptchaManager
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEBUG_CAPTCHAIn debug mode this is the token that the Captcha service will always accept
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description CollectionaddCaptchaGroups(Collection selectedGroups)Method adds a Collection of group names to the existing groups for the captcha group setting.voidexcludeGroups()voidexcludeNone()voidexcludeRegisteredUsers()booleanforceValidateCaptcha(String captchaId, String captchaResponse)StringgenerateCaptchaId()StringgetExclude()com.octo.captcha.service.image.ImageCaptchaServicegetImageCaptchaService()Deprecated.since 8.7booleanisCaptchaAvailable()booleanisCaptchaEnabled()booleanisDebugEnabled()voidremoveCaptchaGroup(String group)Removes a group from the list of captcha groupsvoidsetCaptchaEnabled(boolean value)voidsetCaptchaGroups(Collection groupList)voidsetDebugMode(boolean value)If true the captcha manager will accept "DEBUG" for every generated capthca and reject all other tokens.voidsetExclude(String value)voidsetImageCaptchaService(com.octo.captcha.service.image.ImageCaptchaService imageCaptchaService)Deprecated.since 8.7booleanshowCaptchaForCurrentUser()Determines whether a capture has to be shown for the currently logged in usersbooleanvalidateCaptcha(String captchaId, String captchaResponse)validate captcha response
-
-
-
Field Detail
-
DEBUG_CAPTCHA
static final String DEBUG_CAPTCHA
In debug mode this is the token that the Captcha service will always accept- See Also:
- Constant Field Values
-
-
Method Detail
-
validateCaptcha
boolean validateCaptcha(String captchaId, String captchaResponse)
validate captcha response- Parameters:
captchaId-captchaResponse-- Returns:
- boolean
-
isCaptchaEnabled
boolean isCaptchaEnabled()
-
setCaptchaEnabled
void setCaptchaEnabled(boolean value)
-
isDebugEnabled
boolean isDebugEnabled()
-
setDebugMode
void setDebugMode(boolean value)
If true the captcha manager will accept "DEBUG" for every generated capthca and reject all other tokens. This is meant primarly for acceptance testing user interface elements with Captcha forms.If true the exclude list is ignored and a Captcha prompt is supplied for all requests
- Parameters:
value-
-
getExclude
String getExclude()
-
setExclude
void setExclude(String value)
-
addCaptchaGroups
Collection addCaptchaGroups(Collection selectedGroups)
Method adds a Collection of group names to the existing groups for the captcha group setting.- Parameters:
selectedGroups- Collection of group names- Returns:
- Collection of added group names
-
removeCaptchaGroup
void removeCaptchaGroup(String group)
Removes a group from the list of captcha groups- Parameters:
group- String
-
showCaptchaForCurrentUser
boolean showCaptchaForCurrentUser()
Determines whether a capture has to be shown for the currently logged in users
-
excludeNone
void excludeNone()
-
excludeRegisteredUsers
void excludeRegisteredUsers()
-
excludeGroups
void excludeGroups()
-
setCaptchaGroups
void setCaptchaGroups(Collection groupList)
-
isCaptchaAvailable
boolean isCaptchaAvailable()
-
setImageCaptchaService
@Deprecated void setImageCaptchaService(com.octo.captcha.service.image.ImageCaptchaService imageCaptchaService)
Deprecated.since 8.7
-
getImageCaptchaService
@Deprecated com.octo.captcha.service.image.ImageCaptchaService getImageCaptchaService()
Deprecated.since 8.7
-
generateCaptchaId
String generateCaptchaId()
- Returns:
- a new captchaId
-
-