public void validatePassword(String userPassword) throws UserNamePasswordValidationException {
  AMUserPasswordValidation plugin=getUPValidationInstance();
  try {
    if (plugin != null) {
      if (debug.messageEnabled()) {
        debug.message("Validating password...");
      }
      plugin.validatePassword(userPassword);
    }
 else {
      if (debug.messageEnabled()) {
        debug.message("No plugin found");
      }
    }
  }
 catch (  AMException ame) {
    if (debug.messageEnabled()) {
      debug.message("Password validation Failed " + ame.getMessage());
    }
    throw new UserNamePasswordValidationException(ame);
  }
catch (  Exception ex) {
    if (debug.messageEnabled()) {
      debug.message("Unknown Exception occured during password validation");
    }
    throw new UserNamePasswordValidationException(ex);
  }
}

public void validatePassword ( String userPassword ) throws UserNamePasswordValidationException { AMUserPasswordValidation plugin = getUPValidationInstance ( ) ; try { if ( plugin != null ) { if ( debug . messageEnabled ( ) ) { debug . message ( "Validating password..." ) ; } plugin . validatePassword ( userPassword ) ; } else { if ( debug . messageEnabled ( ) ) { debug . message ( "No plugin found" ) ; } } } catch ( AMException ame ) { if ( debug . messageEnabled ( ) ) { debug . message ( "Password validation Failed " + ame . getMessage ( ) ) ; } throw new UserNamePasswordValidationException ( ame ) ; } catch ( Exception ex ) { if ( debug . messageEnabled ( ) ) { debug . message ( "Unknown Exception occured during password validation" ) ; } throw new UserNamePasswordValidationException ( ex ) ; } }
validate password for the distinguished user , this will use validation plugin if exists to validate password
