CA Identity Manager
Java SDK r12.5 SP 8

 

com.netegrity.ims.adapters
Class ForgottenPasswordHandler

java.lang.Object
  extended by LifeCycleImpl
      extended by com.netegrity.imapi.LogicalAttributeAdapter
          extended by com.netegrity.ims.adapters.ForgottenPasswordHandler
All Implemented Interfaces:
LifeCycle, Logger, java.io.Serializable

public class ForgottenPasswordHandler
extends LogicalAttributeAdapter
implements java.io.Serializable

This class is used to set secret questions and answers for validating the user during the Forgotten Password task. A user can specify one or more pairs of questions and answers to verify his or her identity. How the questions and answers are stored in the user store is determined by the choice of schema:

You can customize the way the questions are queried by overriding the getQuestions() method. You can also encrypt the input. By default,the input is not encrypted.

Since:
Identity Manager 8.1

Field Summary
static java.lang.String ANSWER
          Constant used to get a single answer stored by itself from the Logical Attribute handler.
static java.lang.String CONTROL_DATA
          Constant used to get the ControlData property from the Logical Attribute handler.
static java.lang.String DAYS_BEFORE_REUSE
          Constant used to get the number of days before a challenge question can be reused from the Logical Attribute handler.
static java.lang.String ENCRYPTION_KEY
          Constant used to get the EncryptionKey property from the Logical Atribute handler.
static java.lang.String MULTIPLE_ANSWERS
          Constant used to get a list of answers from the Logical Attribute handler.
static java.lang.String MULTIPLE_QUESTIONS
          Constant used to get a list of available questions from the Logical Attribute handler.
static java.lang.String MULTIPLE_QUESTIONS_ANSWERS
          Constant used to get all challenge questions and answers when they stored together from the Logical Attribute handler.
static java.lang.String QUESTION
          Constant used to get a single question stored by itself from the Logical Attribute handler..
static java.lang.String QUESTION_ANSWER
          Constant used to get a question and an answer, stored together and separated by a delimiter, from the Logical Attribute handler.
static java.lang.String QUESTION_BUNDLE
          Constant used to get the .properties file in the IdentityMinder.ear\custom directory from the Logical Attribute handler.
static java.lang.String QUESTION_DELIMITER
          Constant used to get the Delimiter property from the Logical Attribute hamdler.
static java.lang.String QUESTION_FILE
          Constant used to get the QuestionFile property from the Logical Attribute handler.
static java.lang.String QUESTION_MARK
          Denotes the "?" character, the default delimiter between the question and its answer when they are stored together.
static java.lang.String SCHEMA
          Constant used to get the schema type from the Logical Attribute handler.
static java.lang.String SCHEMA_MV_ATTRIBUTE
          Constant used to get questions and answers stored in a single, multi-valued attribute from the Logical Attribute handler.
static java.lang.String SCHEMA_SEPARATE_ATTRIBUTES
          Constant used to get each question and each answer when stored separately from the Logical Attribute handler.
static java.lang.String SCHEMA_SIN_ATTRIBUTES
          Constant used to get a question and answer pair stored in a single attribute from the Logical Attribute handler.
static java.lang.String VALIDATE
          Constant used to get a user property whose value is protected from the Logical Attribute handler.
static java.lang.String VERIFY_ANSWER
          Constant used to get the answer associated with a dynamically selected verification question.
static java.lang.String VERIFY_QUESTION
          Constant used to get a verification question, which is dynamically selected at random from a list of challenge questions,
 
Constructor Summary
ForgottenPasswordHandler()
           
 
Method Summary
 java.lang.String decrypt(LogicalAttributeContext attrContext, java.lang.String in)
          Returns a decrypted version of the input string.
 java.lang.String encrypt(LogicalAttributeContext attrContext, java.lang.String in)
          Returns an encrypted version of the input string.
 java.util.Vector getQuestions(java.util.Hashtable imeProperties)
          Gets a list of available questions.
 void init(java.util.Hashtable imeProperties)
          Analyzes properties specified in the logical attribute configuration file.
 void initialize(LogicalAttributeContext attrContext)
          Not implemented.
 void initializeOptionList(LogicalAttributeContext attrContext)
          Sets the logical attribute "Questions" to the list returned by the getQuestions() method.
 void toLogical(LogicalAttributeContext attrContext)
          Converts physical attributes to logical attributes based on the schema.
 void toPhysical(LogicalAttributeContext attrContext)
          Collects logical attributes and converts them to physical attributes based on the schema type.
 void validate(LogicalAttributeContext attrContext)
          Executed during the Profile Modification task.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.netegrity.imapi.LifeCycle
init, shutdown, startup, uninit
 
Methods inherited from interface com.netegrity.imapi.Logger
logDebugMessage, logErrorMessage, logInfoMessage, logWarningMessage
 

Field Detail

QUESTION_DELIMITER

public static final java.lang.String QUESTION_DELIMITER
Constant used to get the Delimiter property from the Logical Attribute hamdler.

See Also:
Constant Field Values

QUESTION_MARK

public static final java.lang.String QUESTION_MARK
Denotes the "?" character, the default delimiter between the question and its answer when they are stored together.

See Also:
Constant Field Values

ENCRYPTION_KEY

public static final java.lang.String ENCRYPTION_KEY
Constant used to get the EncryptionKey property from the Logical Atribute handler. By default, the encryption key is null.

See Also:
Constant Field Values

CONTROL_DATA

public static final java.lang.String CONTROL_DATA
Constant used to get the ControlData property from the Logical Attribute handler. The ControlData property specifies whether time-stamp information is recorded for each question used by the Forgotten Password task.

See Also:
Constant Field Values

QUESTION_FILE

public static final java.lang.String QUESTION_FILE
Constant used to get the QuestionFile property from the Logical Attribute handler. The QuestionFile attribute specifies the location of the file in which the configured questions are stored.

See Also:
Constant Field Values

QUESTION_BUNDLE

public static final java.lang.String QUESTION_BUNDLE
Constant used to get the .properties file in the IdentityMinder.ear\custom directory from the Logical Attribute handler.

See Also:
Constant Field Values

DAYS_BEFORE_REUSE

public static final java.lang.String DAYS_BEFORE_REUSE
Constant used to get the number of days before a challenge question can be reused from the Logical Attribute handler. The default is 0. Only in effect when CONTROL_DATA is set to true.

See Also:
Constant Field Values

VALIDATE

public static final java.lang.String VALIDATE
Constant used to get a user property whose value is protected from the Logical Attribute handler. For example, if the physical attributes First Name and Last Name are listed as logical attributes Validate1 and Validate2, the user could not use these values in questions and answers.

See Also:
Constant Field Values

QUESTION

public static final java.lang.String QUESTION
Constant used to get a single question stored by itself from the Logical Attribute handler..

See Also:
Constant Field Values

ANSWER

public static final java.lang.String ANSWER
Constant used to get a single answer stored by itself from the Logical Attribute handler.

See Also:
Constant Field Values

QUESTION_ANSWER

public static final java.lang.String QUESTION_ANSWER
Constant used to get a question and an answer, stored together and separated by a delimiter, from the Logical Attribute handler.

See Also:
Constant Field Values

MULTIPLE_QUESTIONS

public static final java.lang.String MULTIPLE_QUESTIONS
Constant used to get a list of available questions from the Logical Attribute handler.

See Also:
Constant Field Values

MULTIPLE_ANSWERS

public static final java.lang.String MULTIPLE_ANSWERS
Constant used to get a list of answers from the Logical Attribute handler.

See Also:
Constant Field Values

MULTIPLE_QUESTIONS_ANSWERS

public static final java.lang.String MULTIPLE_QUESTIONS_ANSWERS
Constant used to get all challenge questions and answers when they stored together from the Logical Attribute handler.

See Also:
Constant Field Values

VERIFY_QUESTION

public static final java.lang.String VERIFY_QUESTION
Constant used to get a verification question, which is dynamically selected at random from a list of challenge questions,

See Also:
Constant Field Values

VERIFY_ANSWER

public static final java.lang.String VERIFY_ANSWER
Constant used to get the answer associated with a dynamically selected verification question.

See Also:
Constant Field Values

SCHEMA

public static final java.lang.String SCHEMA
Constant used to get the schema type from the Logical Attribute handler.

See Also:
Constant Field Values

SCHEMA_MV_ATTRIBUTE

public static final java.lang.String SCHEMA_MV_ATTRIBUTE
Constant used to get questions and answers stored in a single, multi-valued attribute from the Logical Attribute handler.

See Also:
Constant Field Values

SCHEMA_SIN_ATTRIBUTES

public static final java.lang.String SCHEMA_SIN_ATTRIBUTES
Constant used to get a question and answer pair stored in a single attribute from the Logical Attribute handler.

See Also:
Constant Field Values

SCHEMA_SEPARATE_ATTRIBUTES

public static final java.lang.String SCHEMA_SEPARATE_ATTRIBUTES
Constant used to get each question and each answer when stored separately from the Logical Attribute handler.

See Also:
Constant Field Values
Constructor Detail

ForgottenPasswordHandler

public ForgottenPasswordHandler()
Method Detail

init

public void init(java.util.Hashtable imeProperties)
          throws java.lang.Exception
Analyzes properties specified in the logical attribute configuration file. If a property has an input value, this value is used to initialize the corresponding class member variable. If no value is specified, a default value is used.

Specified by:
init in interface LifeCycle
Parameters:
imeProperties - A hashtable providing configured input values for Forgotten Password task properties.
Throws:
java.lang.Exception

getQuestions

public java.util.Vector getQuestions(java.util.Hashtable imeProperties)
                              throws java.lang.Exception
Gets a list of available questions. Depending on the configuration, the list is built in one of three ways:

Override this method to implement a different way of of retrieving questions for user validation.

Parameters:
imeProperties - A hashtable providing configured input values for forgotten password task properties.
Returns:
a Vector of verification questions
Throws:
java.lang.Exception

initialize

public void initialize(LogicalAttributeContext attrContext)
                throws java.lang.Exception
Not implemented.

Overrides:
initialize in class LogicalAttributeAdapter
Parameters:
attrContext - Logical attribute context information that Identity Manager passes into the method.
Throws:
java.lang.Exception

initializeOptionList

public void initializeOptionList(LogicalAttributeContext attrContext)
                          throws java.lang.Exception
Sets the logical attribute "Questions" to the list returned by the getQuestions() method.

Overrides:
initializeOptionList in class LogicalAttributeAdapter
Parameters:
attrContext - Logical attribute context information that Identity Manager passes into the method.
Throws:
java.lang.Exception

toPhysical

public void toPhysical(LogicalAttributeContext attrContext)
                throws java.lang.Exception
Collects logical attributes and converts them to physical attributes based on the schema type.

Overrides:
toPhysical in class LogicalAttributeAdapter
Parameters:
attrContext - Logical attribute context information that Identity Manager passes into the method.
Throws:
java.lang.Exception

toLogical

public void toLogical(LogicalAttributeContext attrContext)
               throws java.lang.Exception
Converts physical attributes to logical attributes based on the schema. This method also presents the verification questions requested by the Forgotten Password task.

Overrides:
toLogical in class LogicalAttributeAdapter
Parameters:
attrContext - Logical attribute context information that Identity Manager passes into the method.
Throws:
java.lang.Exception

validate

public void validate(LogicalAttributeContext attrContext)
              throws java.lang.Exception
Executed during the Profile Modification task. It is not involved in the Forgotten Password task.

Overrides:
validate in class LogicalAttributeAdapter
Parameters:
attrContext - Logical attribute context information that Identity Manager passes into the method.
Throws:
java.lang.Exception

encrypt

public java.lang.String encrypt(LogicalAttributeContext attrContext,
                                java.lang.String in)
                         throws java.lang.Exception
Returns an encrypted version of the input string. This method uses the current encryption program if an encryption key is passed in. There is no encryption by default.
You can override this method and the accompanying decrypt method to implement another encryption application.

Parameters:
attrContext - Logical attribute context information that Identity Manager passes into the method.
in - the String to be encrypted
Returns:
an encrypted String
Throws:
java.lang.Exception

decrypt

public java.lang.String decrypt(LogicalAttributeContext attrContext,
                                java.lang.String in)
                         throws java.lang.Exception
Returns a decrypted version of the input string. You must override this method along with encrypt method to implement your own encryption, There is no encryption by default.

Parameters:
attrContext - Logical attribute context information that Identity Manager passes into the method.
in - the String to be decrypted
Returns:
a decrypted String
Throws:
java.lang.Exception

CA Identity Manager
Java SDK r12.5 SP 8

06/13/2011

© 2011 CA Technologies, Inc. All rights reserved.