Package io.goobi.viewer.managedbeans
Class CaptchaBean
java.lang.Object
io.goobi.viewer.managedbeans.CaptchaBean
- All Implemented Interfaces:
Serializable
Handles security question checks.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
Selects a random security question from configured list and setscurrentSecurityQuestion
to it.void
setSecurityAnswer
(String securityAnswer)
-
Constructor Details
-
CaptchaBean
public CaptchaBean() -
CaptchaBean
-
-
Method Details
-
resetSecurityQuestion
public boolean resetSecurityQuestion()Selects a random security question from configured list and setscurrentSecurityQuestion
to it.- Returns:
- always true (do not change since that would break rendered conditions on security questions in xhtml)
-
checkAnswer
public boolean checkAnswer()- Returns:
- true if answer correct; false otherwise
-
getSecurityQuestion
- Returns:
- the securityQuestion
-
getSecurityAnswer
- Returns:
- the securityAnswer
-
setSecurityAnswer
- Parameters:
securityAnswer
- the securityAnswer to set
-