public class ChallengesAndResponses
extends java.lang.Object
| Constructor and Description |
|---|
ChallengesAndResponses(java.util.Map challengesAndResponses)
Creates a ChallengesAndResponses from a Map.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChallengeResponse(java.lang.String challenge,
java.lang.String response)
Adds a challenge and corresponding response to this ChallengesAndResponses.
|
java.util.Collection |
getChallenges()
Returns a users challenges.
|
java.util.Map |
getChallengesAndResponses()
Returns all challenges and responses in this ChallengesAndResponses in a
Map where keys are challenges (String) and values are responses (hashed String).
|
java.util.Collection |
getChallengesToHash()
Returns the challenges to hash.
|
void |
modifyChallengeResponse(java.lang.String challenge,
java.lang.String response)
Modifies the response to a challenge in this ChallengesAndResponses.
|
void |
removeChallengeResponse(java.lang.String challenge)
Removes a challenge and its response from this ChallengesAndResponses.
|
public ChallengesAndResponses(java.util.Map challengesAndResponses)
challengesAndResponses - a Map where the keys are challenges (String)
and the values are responses (hashed String).
Note: If the client of the API creates this object, the responses are assumed to
be hashed and then base64 encoded. Make sure to use the same message digest
algorithm used by ITIM by looking the property "enrole.encryption.passwordDigest"
in enRole.properties file.MessageDigestpublic java.util.Collection getChallenges()
String, a user's configured challenges.public void addChallengeResponse(java.lang.String challenge,
java.lang.String response)
challenge - a plain text String that defines a single challenge,
namely a question or sentence.response - a plain text String that is the answer to the challenge.public void modifyChallengeResponse(java.lang.String challenge,
java.lang.String response)
challenge - a plain text String that defines a single challenge,
namely a question or sentence.response - the new plain text String that is the answer to the challenge.
Replaces the existing response in this ChallengesAndResponses.public void removeChallengeResponse(java.lang.String challenge)
challenge - the challenge to remove from this ChallengesAndResponses.public java.util.Map getChallengesAndResponses()
public java.util.Collection getChallengesToHash()