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 SummaryFields inherited from interface com.atlassian.confluence.security.CaptchaManagerDEBUG_CAPTCHA
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddCaptchaGroups(Collection<String> groupList) Method adds a Collection of group names to the existing groups for the captcha group setting.voidvoiddestroy()voidvoidvoidbooleanforceValidateCaptcha(String captchaId, String captchaResponse) com.octo.captcha.service.image.ImageCaptchaServicebooleanbooleanbooleanvoidremoveCaptchaGroup(String group) Removes a group from the list of captcha groupsvoidsetCaptchaEnabled(boolean value) voidsetCaptchaEngineClassName(String captchaEngineClassName) voidsetCaptchaGroups(Collection<String> groupList) voidsetCaptchaStore(com.octo.captcha.service.captchastore.CaptchaStore captchaStore) voidsetDebugMode(boolean value) If true the captcha manager will accept "DEBUG" for every generated capthca and reject all other tokens.voidsetEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher) voidsetExclude(String value) voidsetSettingsManager(SettingsManager settingsManager) voidsetUserAccessor(UserAccessor userAccessor) booleanDetermines whether a capture has to be shown for the currently logged in usersbooleanvalidateCaptcha(String captchaId, String captchaResponse) validate captcha response
- 
Constructor Details- 
DefaultCaptchaManagerpublic DefaultCaptchaManager()
 
- 
- 
Method Details- 
setCaptchaStorepublic void setCaptchaStore(com.octo.captcha.service.captchastore.CaptchaStore captchaStore) 
- 
setCaptchaEngineClassName
- 
afterPropertiesSet- Specified by:
- afterPropertiesSetin interface- org.springframework.beans.factory.InitializingBean
- Throws:
- Exception
 
- 
destroy- Specified by:
- destroyin interface- org.springframework.beans.factory.DisposableBean
- Throws:
- Exception
 
- 
isCaptchaAvailablepublic boolean isCaptchaAvailable()- Specified by:
- isCaptchaAvailablein interface- CaptchaManager
 
- 
validateCaptchaDescription copied from interface:CaptchaManagervalidate captcha response- Specified by:
- validateCaptchain interface- CaptchaManager
- Parameters:
- captchaId-
- captchaResponse-
- Returns:
- boolean
 
- 
forceValidateCaptcha- Specified by:
- forceValidateCaptchain interface- CaptchaManager
 
- 
isCaptchaEnabledpublic boolean isCaptchaEnabled()- Specified by:
- isCaptchaEnabledin interface- CaptchaManager
 
- 
setCaptchaEnabledpublic void setCaptchaEnabled(boolean value) - Specified by:
- setCaptchaEnabledin interface- CaptchaManager
 
- 
isDebugEnabledpublic boolean isDebugEnabled()- Specified by:
- isDebugEnabledin interface- CaptchaManager
 
- 
setDebugModepublic void setDebugMode(boolean value) Description copied from interface:CaptchaManagerIf 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:
- setDebugModein interface- CaptchaManager
- Parameters:
- value-
 
- 
excludeNonepublic void excludeNone()- Specified by:
- excludeNonein interface- CaptchaManager
 
- 
excludeRegisteredUserspublic void excludeRegisteredUsers()- Specified by:
- excludeRegisteredUsersin interface- CaptchaManager
 
- 
excludeGroupspublic void excludeGroups()- Specified by:
- excludeGroupsin interface- CaptchaManager
 
- 
getExclude- Specified by:
- getExcludein interface- CaptchaManager
 
- 
setExclude- Specified by:
- setExcludein interface- CaptchaManager
 
- 
setCaptchaGroups- Specified by:
- setCaptchaGroupsin interface- CaptchaManager
 
- 
addCaptchaGroupsDescription copied from interface:CaptchaManagerMethod adds a Collection of group names to the existing groups for the captcha group setting.- Specified by:
- addCaptchaGroupsin interface- CaptchaManager
- Parameters:
- groupList- Collection of group names
- Returns:
- Collection of added group names
 
- 
removeCaptchaGroupDescription copied from interface:CaptchaManagerRemoves a group from the list of captcha groups- Specified by:
- removeCaptchaGroupin interface- CaptchaManager
- Parameters:
- group- String
 
- 
showCaptchaForCurrentUserpublic boolean showCaptchaForCurrentUser()Description copied from interface:CaptchaManagerDetermines whether a capture has to be shown for the currently logged in users- Specified by:
- showCaptchaForCurrentUserin interface- CaptchaManager
 
- 
setSettingsManager
- 
setUserAccessor
- 
setEventPublisherpublic void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher) 
- 
getImageCaptchaServicepublic com.octo.captcha.service.image.ImageCaptchaService getImageCaptchaService()- Specified by:
- getImageCaptchaServicein interface- CaptchaManager
 
- 
generateCaptchaId- Specified by:
- generateCaptchaIdin interface- CaptchaManager
- Returns:
- a new captchaId
 
 
-