| | |
| | | * Portions Copyright 2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.extensions; |
| | | import org.opends.messages.Message; |
| | | |
| | | |
| | | |
| | |
| | | import org.opends.server.types.Operation; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | |
| | | import static org.opends.messages.ExtensionMessages.*; |
| | | import org.opends.messages.MessageBuilder; |
| | | |
| | | |
| | | /** |
| | |
| | | public boolean passwordIsAcceptable(ByteString newPassword, |
| | | Set<ByteString> currentPasswords, |
| | | Operation operation, Entry userEntry, |
| | | StringBuilder invalidReason) |
| | | MessageBuilder invalidReason) |
| | | { |
| | | // Get a handle to the current configuration. |
| | | AttributeValuePasswordValidatorCfg config = currentConfig; |
| | |
| | | if (a.hasValue(vf) || |
| | | (config.isTestReversedPassword() && a.hasValue(vr))) |
| | | { |
| | | int msgID = MSGID_ATTRVALUE_VALIDATOR_PASSWORD_IN_ENTRY; |
| | | invalidReason.append(getMessage(msgID)); |
| | | |
| | | invalidReason.append(ERR_ATTRVALUE_VALIDATOR_PASSWORD_IN_ENTRY.get()); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | */ |
| | | @Override() |
| | | public boolean isConfigurationAcceptable(PasswordValidatorCfg configuration, |
| | | List<String> unacceptableReasons) |
| | | List<Message> unacceptableReasons) |
| | | { |
| | | AttributeValuePasswordValidatorCfg config = |
| | | (AttributeValuePasswordValidatorCfg) configuration; |
| | |
| | | */ |
| | | public boolean isConfigurationChangeAcceptable( |
| | | AttributeValuePasswordValidatorCfg configuration, |
| | | List<String> unacceptableReasons) |
| | | List<Message> unacceptableReasons) |
| | | { |
| | | // If we've gotten this far, then we'll accept the change. |
| | | return true; |
| | |
| | | { |
| | | ResultCode resultCode = ResultCode.SUCCESS; |
| | | boolean adminActionRequired = false; |
| | | ArrayList<String> messages = new ArrayList<String>(); |
| | | ArrayList<Message> messages = new ArrayList<Message>(); |
| | | |
| | | |
| | | currentConfig = configuration; |