Package io.goobi.viewer.model.security
Class SecurityQuestion
java.lang.Object
io.goobi.viewer.model.security.SecurityQuestion
Represents a security question with a message-key for the question text and a set of
accepted answers, tracking whether the question has already been answered.
-
Constructor Summary
ConstructorsConstructorDescriptionSecurityQuestion(String questionKey, Set<String> correctAnswers) Constructor. -
Method Summary
-
Constructor Details
-
SecurityQuestion
Constructor.- Parameters:
questionKey- message key for the question text to displaycorrectAnswers- set of accepted answer strings (case-insensitive)
-
-
Method Details
-
isAnswerCorrect
- Parameters:
answer- user-provided answer to validate- Returns:
- true if given answer is among correct answers; false otherwise
-
getQuestionKey
-
getCorrectAnswers
-
isAnswered
public boolean isAnswered()
-