Class KbaConfig
java.lang.Object
org.forgerock.selfservice.core.config.KbaConfig
Represents a single KBA question in various Locales.
- Since:
- 0.2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the property name in user json instance where kba details will be set.Gets the kba questions.Gets the kba secureHash.inthashCode()setKbaPropertyName(String kbaPropertyName) Sets the property name in user json instance where kba details will be set.Sets the kba questions.setSecureHash(Map<String, Object> secureHash) Sets the kba secureHash.
-
Constructor Details
-
KbaConfig
public KbaConfig()
-
-
Method Details
-
getKbaPropertyName
Gets the property name in user json instance where kba details will be set.- Returns:
- property name
-
setKbaPropertyName
Sets the property name in user json instance where kba details will be set.- Parameters:
kbaPropertyName- the property name- Returns:
- this config instance
-
getQuestions
Gets the kba questions. The questions will be in the format of: { "1": { "en": "What's your favorite color?", "en_GB": "What is your favourite colour?", "fr": "Quelle est votre couleur préférée?" }, "2": { "en": "Who was your first employer?" } }- Returns:
- the kba questions
-
getSecureHash
Gets the kba secureHash. The secureHash will be in the format of: { "algorithm" : "SHA-256" } Some hashing algorithms have further parameters, such as BCRYPT which can have a cost associated with it. { "algorithm" : "BCRYPT", "cost" : 10 }- Returns:
- the kba secureHash
-
setQuestions
Sets the kba questions. Questions will be in the format of: { "1": { "en": "What's your favorite color?", "en_GB": "What is your favourite colour?", "fr": "Quelle est votre couleur préférée?" }, "2": { "en": "Who was your first employer?" } } The number values above represent the questionId's and the inner string values represent the question locale and its translation.- Parameters:
questions- the kba question- Returns:
- this config instance
-
setSecureHash
Sets the kba secureHash.- Parameters:
secureHash- the kba secureHash- Returns:
- this config instance
-
equals
-
hashCode
public int hashCode()
-