com.ibm.itim.apps.identity

Class ChallengesAndResponses

  • java.lang.Object
    • com.ibm.itim.apps.identity.ChallengesAndResponses
    • Constructor Summary

      Constructors 
      Constructor and Description
      ChallengesAndResponses(java.util.Map challengesAndResponses)
      Creates a ChallengesAndResponses from a Map.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ChallengesAndResponses

        public ChallengesAndResponses(java.util.Map challengesAndResponses)
        Creates a ChallengesAndResponses from a Map.
        Parameters:
        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.
        See Also:
        MessageDigest
    • Method Detail

      • getChallenges

        public java.util.Collection getChallenges()
        Returns a users challenges.
        Returns:
        Collection of String, a user's configured challenges.
      • addChallengeResponse

        public void addChallengeResponse(java.lang.String challenge,
                                         java.lang.String response)
        Adds a challenge and corresponding response to this ChallengesAndResponses.
        Parameters:
        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.
      • modifyChallengeResponse

        public void modifyChallengeResponse(java.lang.String challenge,
                                            java.lang.String response)
        Modifies the response to a challenge in this ChallengesAndResponses.
        Parameters:
        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.
      • removeChallengeResponse

        public void removeChallengeResponse(java.lang.String challenge)
        Removes a challenge and its response from this ChallengesAndResponses.
        Parameters:
        challenge - the challenge to remove from this ChallengesAndResponses.
      • getChallengesAndResponses

        public 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).
        Returns:
        a Map of challenges and responses where keys are challenges (String) and values are responses (hashed String).
      • getChallengesToHash

        public java.util.Collection getChallengesToHash()
        Returns the challenges to hash.
        Returns:
        a Collection of challenges (String).