Class DefaultCaptchaManager
java.lang.Object
com.atlassian.confluence.security.DefaultCaptchaManager
- All Implemented Interfaces:
CaptchaManager
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
public class DefaultCaptchaManager
extends Object
implements CaptchaManager, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
-
Field Summary
Fields inherited from interface com.atlassian.confluence.security.CaptchaManager
DEBUG_CAPTCHA
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCaptchaGroups
(Collection<String> groupList) Method adds a Collection of group names to the existing groups for the captcha group setting.void
void
destroy()
void
void
void
boolean
forceValidateCaptcha
(String captchaId, String captchaResponse) com.octo.captcha.service.image.ImageCaptchaService
Deprecated.since 8.7Deprecated.since 8.7boolean
boolean
boolean
void
removeCaptchaGroup
(String group) Removes a group from the list of captcha groupsvoid
setCaptchaEnabled
(boolean value) void
setCaptchaEngineClassName
(String captchaEngineClassName) void
setCaptchaGroups
(Collection<String> groupList) void
setCaptchaStore
(com.octo.captcha.service.captchastore.CaptchaStore captchaStore) void
setDebugMode
(boolean value) If true the captcha manager will accept "DEBUG" for every generated capthca and reject all other tokens.void
setEventPublisher
(com.atlassian.event.api.EventPublisher eventPublisher) void
setExclude
(String value) void
setImageCaptchaService
(com.octo.captcha.service.image.ImageCaptchaService imageCaptchaService) Deprecated.since 8.7void
setSettingsManager
(SettingsManager settingsManager) void
setUserAccessor
(UserAccessor userAccessor) boolean
Determines whether a capture has to be shown for the currently logged in usersboolean
validateCaptcha
(String captchaId, String captchaResponse) validate captcha response
-
Constructor Details
-
DefaultCaptchaManager
public DefaultCaptchaManager()
-
-
Method Details
-
setCaptchaStore
public void setCaptchaStore(com.octo.captcha.service.captchastore.CaptchaStore captchaStore) -
setCaptchaEngineClassName
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
destroy
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
Exception
-
isCaptchaAvailable
public boolean isCaptchaAvailable()- Specified by:
isCaptchaAvailable
in interfaceCaptchaManager
-
validateCaptcha
Description copied from interface:CaptchaManager
validate captcha response- Specified by:
validateCaptcha
in interfaceCaptchaManager
- Returns:
- boolean
-
forceValidateCaptcha
- Specified by:
forceValidateCaptcha
in interfaceCaptchaManager
-
isCaptchaEnabled
public boolean isCaptchaEnabled()- Specified by:
isCaptchaEnabled
in interfaceCaptchaManager
-
setCaptchaEnabled
public void setCaptchaEnabled(boolean value) - Specified by:
setCaptchaEnabled
in interfaceCaptchaManager
-
isDebugEnabled
public boolean isDebugEnabled()- Specified by:
isDebugEnabled
in interfaceCaptchaManager
-
setDebugMode
public void setDebugMode(boolean value) Description copied from interface:CaptchaManager
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
- Specified by:
setDebugMode
in interfaceCaptchaManager
-
excludeNone
public void excludeNone()- Specified by:
excludeNone
in interfaceCaptchaManager
-
excludeRegisteredUsers
public void excludeRegisteredUsers()- Specified by:
excludeRegisteredUsers
in interfaceCaptchaManager
-
excludeGroups
public void excludeGroups()- Specified by:
excludeGroups
in interfaceCaptchaManager
-
getExclude
- Specified by:
getExclude
in interfaceCaptchaManager
-
setExclude
- Specified by:
setExclude
in interfaceCaptchaManager
-
setCaptchaGroups
- Specified by:
setCaptchaGroups
in interfaceCaptchaManager
-
addCaptchaGroups
Description copied from interface:CaptchaManager
Method adds a Collection of group names to the existing groups for the captcha group setting.- Specified by:
addCaptchaGroups
in interfaceCaptchaManager
- Parameters:
groupList
- Collection of group names- Returns:
- Collection of added group names
-
removeCaptchaGroup
Description copied from interface:CaptchaManager
Removes a group from the list of captcha groups- Specified by:
removeCaptchaGroup
in interfaceCaptchaManager
- Parameters:
group
- String
-
showCaptchaForCurrentUser
public boolean showCaptchaForCurrentUser()Description copied from interface:CaptchaManager
Determines whether a capture has to be shown for the currently logged in users- Specified by:
showCaptchaForCurrentUser
in interfaceCaptchaManager
-
setSettingsManager
-
getUserAccessor
Deprecated.since 8.7 -
setUserAccessor
-
setEventPublisher
public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher) -
setImageCaptchaService
@Deprecated public void setImageCaptchaService(com.octo.captcha.service.image.ImageCaptchaService imageCaptchaService) Deprecated.since 8.7- Specified by:
setImageCaptchaService
in interfaceCaptchaManager
-
getImageCaptchaService
Deprecated.since 8.7- Specified by:
getImageCaptchaService
in interfaceCaptchaManager
-
generateCaptchaId
- Specified by:
generateCaptchaId
in interfaceCaptchaManager
- Returns:
- a new captchaId
-