Class KbaConfig

java.lang.Object
org.forgerock.selfservice.core.config.KbaConfig

public final class KbaConfig extends Object
Represents a single KBA question in various Locales.
Since:
0.2.0
  • Constructor Details

    • KbaConfig

      public KbaConfig()
  • Method Details

    • getKbaPropertyName

      public String getKbaPropertyName()
      Gets the property name in user json instance where kba details will be set.
      Returns:
      property name
    • setKbaPropertyName

      public KbaConfig setKbaPropertyName(String kbaPropertyName)
      Sets the property name in user json instance where kba details will be set.
      Parameters:
      kbaPropertyName - the property name
      Returns:
      this config instance
    • getQuestions

      public Map<String,Map<String,String>> 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

      public Map<String,Object> 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

      public KbaConfig setQuestions(Map<String,Map<String,String>> questions)
      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

      public KbaConfig setSecureHash(Map<String,Object> secureHash)
      Sets the kba secureHash.
      Parameters:
      secureHash - the kba secureHash
      Returns:
      this config instance
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object