Class ITIMPasswordPolicyImpl
- java.lang.Object
-
- com.ibm.di.plugin.pwstore.itim.policy.impl.ITIMPasswordPolicyImpl
-
- All Implemented Interfaces:
PasswordPolicyService
public final class ITIMPasswordPolicyImpl extends java.lang.Object implements PasswordPolicyService
The class represents a facade that supports password policy validation check, and password synchronization against ITIM. Instances must be created using a PasswordPolicyFactory;ITIMPasswordPolicyFactoryImpl
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetLastStatusMessage()Get the status message returned from the previous invocation ofsynchronizePassword(String, List)orvalidatePassword(String, List).voidinitialize()Perform and required post construction initialization.booleanready()Ensure the password policy subsystem is available.voidsetConnection(PolicyServiceConnection conn)Set the connection.voidsynchronizePassword(java.lang.String userName, java.util.List passwordValues)Synchronize the password values via ITIM.voidterminate()Perform and required cleanup in preparation for shutdown.booleanvalidatePassword(java.lang.String userName, java.util.List passwordValues)Check against ITIM that the password values conform to policy.
-
-
-
Method Detail
-
setConnection
public void setConnection(PolicyServiceConnection conn)
Set the connection.- Specified by:
setConnectionin interfacePasswordPolicyService- Parameters:
conn- - The connection.- Throws:
java.lang.IllegalArgumentException- if conn isnull.
-
ready
public boolean ready()
Ensure the password policy subsystem is available. Check that communication with ITIM is working. If used, this method should be called before validatePassword(List).- Specified by:
readyin interfacePasswordPolicyService- Returns:
- true if policy subsystem is ready.
- Throws:
java.lang.IllegalStateException- ofgetItimPrincipalName()orgetItimPrincipalPassword()equalnull.
-
validatePassword
public boolean validatePassword(java.lang.String userName, java.util.List passwordValues) throws PolicyConnectionException, MalformedResponseExceptionCheck against ITIM that the password values conform to policy.- Specified by:
validatePasswordin interfacePasswordPolicyService- Parameters:
userName- - The user name, e.g. jdoe or eruid=jdoepasswordValues- - List of associated password values to be checked. List must have length > 0- Returns:
- true if all passwords conform to policy.
- Throws:
PolicyConnectionException- if connection to policy service is lost.MalformedResponseException- if a policy service response cannot be parsed.java.lang.IllegalArgumentException- if passwordValues.length() <= 0.java.lang.IllegalStateException- ofgetItimPrincipalName()orgetItimPrincipalPassword()equalnull.
-
synchronizePassword
public void synchronizePassword(java.lang.String userName, java.util.List passwordValues) throws PolicyConnectionException, MalformedResponseException, PasswordSynchExceptionSynchronize the password values via ITIM.- Specified by:
synchronizePasswordin interfacePasswordPolicyService- Parameters:
userName- - The user name whose password values will be synchronized.passwordValues- - List of associated password values to be checked. List must have length > 0- Throws:
PolicyConnectionException- if connection to policy service is lost.MalformedResponseException- if a policy service response cannot be parsed.PasswordSynchException- if any single password value cannot be synchronized, e.g. connection failure.java.lang.IllegalArgumentException- if passwordValues.length() <= 0, or either parameter reference is null..java.lang.IllegalStateException- ofgetItimPrincipalName()orgetItimPrincipalPassword()equalnull.
-
initialize
public void initialize() throws PolicyInitializationExceptionPerform and required post construction initialization. For example, establish network connections.- Specified by:
initializein interfacePasswordPolicyService- Throws:
PolicyInitializationException
-
terminate
public void terminate()
Perform and required cleanup in preparation for shutdown.- Specified by:
terminatein interfacePasswordPolicyService
-
getLastStatusMessage
public java.lang.String getLastStatusMessage()
Get the status message returned from the previous invocation ofsynchronizePassword(String, List)orvalidatePassword(String, List).- Specified by:
getLastStatusMessagein interfacePasswordPolicyService- Returns:
- The status message from the service, or
nullif no status was returned.
-
-