Interface CaptchaManager
- All Known Implementing Classes:
DefaultCaptchaManager
public interface CaptchaManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
In debug mode this is the token that the Captcha service will always accept -
Method Summary
Modifier and TypeMethodDescriptionaddCaptchaGroups
(Collection<String> selectedGroups) Method adds a Collection of group names to the existing groups for the captcha group setting.void
void
void
boolean
forceValidateCaptcha
(String captchaId, String captchaResponse) com.octo.captcha.service.image.ImageCaptchaService
Deprecated.since 8.7boolean
boolean
boolean
void
removeCaptchaGroup
(String group) Removes a group from the list of captcha groupsvoid
setCaptchaEnabled
(boolean value) void
setCaptchaGroups
(Collection<String> groupList) void
setDebugMode
(boolean value) If true the captcha manager will accept "DEBUG" for every generated capthca and reject all other tokens.void
setExclude
(String value) void
setImageCaptchaService
(com.octo.captcha.service.image.ImageCaptchaService imageCaptchaService) Deprecated.since 8.7boolean
Determines whether a capture has to be shown for the currently logged in usersboolean
validateCaptcha
(String captchaId, String captchaResponse) validate captcha response
-
Field Details
-
DEBUG_CAPTCHA
In debug mode this is the token that the Captcha service will always accept- See Also:
-
-
Method Details
-
validateCaptcha
validate captcha response- Parameters:
captchaId
-captchaResponse
-- Returns:
- boolean
-
forceValidateCaptcha
-
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
-
addCaptchaGroups
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
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
-
isCaptchaAvailable
boolean isCaptchaAvailable() -
setImageCaptchaService
@Deprecated void setImageCaptchaService(com.octo.captcha.service.image.ImageCaptchaService imageCaptchaService) Deprecated.since 8.7 -
getImageCaptchaService
Deprecated.since 8.7 -
generateCaptchaId
String generateCaptchaId()- Returns:
- a new captchaId
-