use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsConnectionPanel method initParam.
@Override
public void initParam(Object obj) {
OptionsParam optionsParam = (OptionsParam) obj;
ConnectionParam connectionParam = optionsParam.getConnectionParam();
// set Proxy Chain parameters
txtProxyChainRealm.setText(connectionParam.getProxyChainRealm());
txtProxyChainRealm.discardAllEdits();
txtProxyChainUserName.setText(connectionParam.getProxyChainUserName());
txtProxyChainUserName.discardAllEdits();
//Default don't show (everytime)
chkShowPassword.setSelected(false);
//Default mask (everytime)
txtProxyChainPassword.setEchoChar('*');
this.proxyDialog.pack();
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsConnectionPanel method saveParam.
@Override
public void saveParam(Object obj) throws Exception {
OptionsParam optionsParam = (OptionsParam) obj;
ConnectionParam connectionParam = optionsParam.getConnectionParam();
connectionParam.setProxyChainRealm(txtProxyChainRealm.getText());
connectionParam.setProxyChainUserName(txtProxyChainUserName.getText());
// Make sure this isnt saved in the config file
connectionParam.setProxyChainPassword(new String(txtProxyChainPassword.getPassword()), false);
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsAntiCsrfPanel method saveParam.
@Override
public void saveParam(Object obj) throws Exception {
OptionsParam optionsParam = (OptionsParam) obj;
AntiCsrfParam antiCsrfParam = optionsParam.getAntiCsrfParam();
antiCsrfParam.setTokens(getAntiCsrfModel().getElements());
antiCsrfParam.setConfirmRemoveToken(!tokensOptionsPanel.isRemoveWithoutConfirmation());
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsAntiCsrfPanel method initParam.
@Override
public void initParam(Object obj) {
OptionsParam optionsParam = (OptionsParam) obj;
AntiCsrfParam param = optionsParam.getAntiCsrfParam();
getAntiCsrfModel().setTokens(param.getTokens());
tokensOptionsPanel.setRemoveWithoutConfirmation(!param.isConfirmRemoveToken());
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsApiPanel method initParam.
/*
public JCheckBox getChkPostActions() {
if (chkPostActions == null) {
chkPostActions = new JCheckBox();
chkPostActions.setText(Constant.messages.getString("api.options.postactions"));
chkPostActions.setVerticalAlignment(javax.swing.SwingConstants.TOP);
chkPostActions.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
}
return chkPostActions;
}
*/
@Override
public void initParam(Object obj) {
OptionsParam options = (OptionsParam) obj;
getChkEnabled().setSelected(options.getApiParam().isEnabled());
getChkUiEnabled().setSelected(options.getApiParam().isUiEnabled());
getChkSecureOnly().setSelected(options.getApiParam().isSecureOnly());
getDisableKey().setSelected(options.getApiParam().isDisableKey());
getIncErrorDetails().setSelected(options.getApiParam().isIncErrorDetails());
getAutofillKey().setSelected(options.getApiParam().isAutofillKey());
getEnableJSONP().setSelected(options.getApiParam().isEnableJSONP());
getReportPermErrors().setSelected(options.getApiParam().isReportPermErrors());
getNoKeyForSafeOps().setSelected(options.getApiParam().isNoKeyForSafeOps());
getKeyField().setText(options.getApiParam().getKey());
//getChkPostActions().setSelected(options.getApiParam().isPostActions());
getKeyField().setEnabled(!disableKey.isSelected());
getGenerateKeyButton().setEnabled(!disableKey.isSelected());
getPermittedAddressesTableModel().setAddresses(options.getApiParam().getPermittedAddresses());
getProxyPermittedAddressesPanel().setRemoveWithoutConfirmation(!options.getApiParam().isConfirmRemovePermittedAddress());
}
Aggregations