Interface PasswordPolicyService
-
- All Known Implementing Classes:
ITIMPasswordPolicyImpl
public interface PasswordPolicyServiceProvides features to enable password value conformance check and synchonization against externally defined policies.
-
-
Method Summary
All Methods Instance Methods Abstract 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)Propagate the password values for the given user.voidterminate()Perform and required cleanup in preparation for shutdown.booleanvalidatePassword(java.lang.String userName, java.util.List passwordValues)Check the password values conform to policy.
-
-
-
Method Detail
-
setConnection
void setConnection(PolicyServiceConnection conn)
Set the connection.- Parameters:
conn- - The connection.- Throws:
java.lang.IllegalArgumentException- if conn isnull.
-
ready
boolean ready()
Ensure the password policy subsystem is available. For example, check that network connectivity is available. If used, this method should be called before validatePassword(List).- Returns:
- true if policy subsystem is ready.
-
validatePassword
boolean validatePassword(java.lang.String userName, java.util.List passwordValues) throws PolicyConnectionException, MalformedResponseExceptionCheck the password values conform to policy.- 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.
-
synchronizePassword
void synchronizePassword(java.lang.String userName, java.util.List passwordValues) throws PolicyConnectionException, MalformedResponseException, PasswordSynchExceptionPropagate the password values for the given user.- Parameters:
userName- - The user name, e.g. jdoe or eruid=jdoepasswordValues- - List of associated password values to be synchronized. 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.
-
initialize
void initialize() throws PolicyInitializationExceptionPerform and required post construction initialization. For example, establish network connections.- Throws:
PolicyInitializationException
-
terminate
void terminate()
Perform and required cleanup in preparation for shutdown.
-
getLastStatusMessage
java.lang.String getLastStatusMessage()
Get the status message returned from the previous invocation ofsynchronizePassword(String, List)orvalidatePassword(String, List).- Returns:
- The status message from the service, or
nullif no status was returned.
-
-