summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalina Jasinska <kalina.jasinska@gmail.com>2013-08-06 07:54:31 (GMT)
committer Kalina Jasinska <kalina.jasinska@gmail.com>2013-08-06 07:54:31 (GMT)
commit211369f62df06b771abd4a9c146829773bfe0b80 (patch)
tree17c73e588aa98e53321b3329183985d4b31c7cca
parent0394366f9bd1324040c814bd7668e805cfe6689e (diff)
parent0c8bc2e9012d3a8ad84c68e36229d5de20503b03 (diff)
downloadQCG-Data-211369f62df06b771abd4a9c146829773bfe0b80.zip
QCG-Data-211369f62df06b771abd4a9c146829773bfe0b80.tar.gz
QCG-Data-211369f62df06b771abd4a9c146829773bfe0b80.tar.bz2
logowanie
-rw-r--r--idrop-swing/pom.xml22
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.form80
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java253
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java4
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java2
5 files changed, 319 insertions, 42 deletions
diff --git a/idrop-swing/pom.xml b/idrop-swing/pom.xml
index 5833bef..0424619 100644
--- a/idrop-swing/pom.xml
+++ b/idrop-swing/pom.xml
@@ -71,10 +71,26 @@
<version>3.3.2.GA</version>
<scope>runtime</scope>
</dependency>
+ <!-- required for GSI support -->
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.5.10</version>
+ <groupId>cryptix</groupId>
+ <artifactId>cryptix</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>cryptix</groupId>
+ <artifactId>cryptix32</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>cryptix</groupId>
+ <artifactId>cryptix-asn1</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk16</artifactId>
+ <version>1.40</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.form
index 7f44c13..6111871 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.form
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.form
@@ -178,7 +178,7 @@
<Container class="javax.swing.JPanel" name="jPanel1">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
- <GridBagConstraints gridX="1" gridY="8" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ <GridBagConstraints gridX="1" gridY="10" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
@@ -201,12 +201,12 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkGuestLoginActionPerformed"/>
</Events>
</Component>
- <Component class="javax.swing.JCheckBox" name="chkRememberPass">
+ <Component class="javax.swing.JCheckBox" name="chkProxyLogin">
<Properties>
- <Property name="text" type="java.lang.String" value="Remember password"/>
+ <Property name="text" type="java.lang.String" value="Use GSI"/>
</Properties>
<Events>
- <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkRememberPassActionPerformed"/>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkProxyLoginActionPerformed"/>
</Events>
</Component>
</SubComponents>
@@ -218,7 +218,7 @@
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
- <GridBagConstraints gridX="0" gridY="7" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ <GridBagConstraints gridX="0" gridY="9" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
@@ -234,7 +234,67 @@
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
- <GridBagConstraints gridX="1" gridY="7" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
+ <GridBagConstraints gridX="1" gridY="9" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblProxy">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Proxy location:"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="7" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JTextField" name="txtProxy">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="7" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblCerts">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Certificates location:"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="8" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JTextField" name="txtCerts">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="8" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JButton" name="btnProxy">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Choose..."/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnProxyActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="2" gridY="7" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JButton" name="btnCerts">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Choose..."/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnCertsActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="2" gridY="8" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
@@ -252,6 +312,14 @@
<Property name="horizontalGap" type="int" value="2"/>
</Layout>
<SubComponents>
+ <Component class="javax.swing.JCheckBox" name="chkRememberPass">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Remember password"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkRememberPassActionPerformed"/>
+ </Events>
+ </Component>
<Component class="javax.swing.JButton" name="btnOK">
<Properties>
<Property name="mnemonic" type="int" value="76"/>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java
index edbdf81..34adf2b 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java
@@ -9,7 +9,14 @@ import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JComponent;
import javax.swing.JDialog;
+import javax.swing.JFileChooser;
import javax.swing.KeyStroke;
+import org.globus.gsi.GlobusCredential;
+import org.globus.gsi.GlobusCredentialException;
+import org.globus.gsi.gssapi.GlobusGSSCredentialImpl;
+import org.ietf.jgss.GSSCredential;
+import org.ietf.jgss.GSSException;
+import org.irods.jargon.core.connection.GSIIRODSAccount;
import org.irods.jargon.core.connection.IRODSAccount;
import org.irods.jargon.core.connection.auth.AuthResponse;
@@ -78,6 +85,18 @@ public class LoginDialog extends JDialog {
} else {
comboLoginMode.setSelectedItem(mode);
}
+
+ String proxy = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_PROXY_LOCATION);
+
+ if(proxy!=null){
+ txtProxy.setText(proxy);
+ }
+
+ String certificates = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_CERTIFICATES_LOCATION);
+
+ if(certificates!=null){
+ txtCerts.setText(certificates);
+ }
txtPort.setText(port);
String zone = idropCore.getIdropConfig().getPropertyForKey(
@@ -89,6 +108,7 @@ public class LoginDialog extends JDialog {
String username = idropCore.getIdropConfig().getPropertyForKey(
IdropConfigurationService.ACCOUNT_CACHE_USER_NAME);
txtUserName.setText(username);
+
String save = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_USER_SAVE_PASS);
boolean saveP = "true".equals(save);
@@ -99,8 +119,9 @@ public class LoginDialog extends JDialog {
loginTrialSuccesful = !processLogin();
}
-
- hideAdvancedViewFields();
+
+ hideAdvancedViewFields();
+ hideProxyLoginFields();
}
private void loginUsingPreset() {
@@ -193,7 +214,13 @@ public class LoginDialog extends JDialog {
irodsAccount = IRODSAccount.instanceForAnonymous(
presetHost, presetPort, "", presetZone,
presetResource);
- } else {
+ } else if(chkProxyLogin.isSelected()){
+ GlobusCredential globusCred = new GlobusCredential(txtProxy.getText());
+ GSSCredential gssCred = new GlobusGSSCredentialImpl(globusCred,GSSCredential.INITIATE_AND_ACCEPT);
+ GSIIRODSAccount acc = GSIIRODSAccount.instance(presetHost, presetPort, gssCred, presetResource);
+ acc.setCertificateAuthority(txtCerts.getText());
+ irodsAccount = acc;
+ } else {
irodsAccount = IRODSAccount.instance(presetHost,
presetPort, txtUserName.getText(), new String(
password.getPassword()), sb.toString(),
@@ -210,7 +237,17 @@ public class LoginDialog extends JDialog {
.getText().trim(), Integer.parseInt(txtPort
.getText().trim()), "", txtZone.getText().trim(),
txtResource.getText().trim());
- } else {
+ } else if(chkProxyLogin.isSelected()){
+ // TODO
+ GlobusCredential globusCred = new GlobusCredential(txtProxy.getText());
+ GSSCredential gssCred = new GlobusGSSCredentialImpl(globusCred, GSSCredential.INITIATE_AND_ACCEPT);
+ GSIIRODSAccount acc = GSIIRODSAccount.instance(
+ txtHost.getText().trim(),
+ Integer.parseInt(txtPort.getText().trim()), gssCred, txtResource.getText().trim());
+ acc.setCertificateAuthority(txtCerts.getText().trim());
+ irodsAccount = acc;
+
+ } else{
irodsAccount = IRODSAccount.instance(txtHost.getText()
.trim(),
Integer.parseInt(txtPort.getText().trim()),
@@ -226,7 +263,15 @@ public class LoginDialog extends JDialog {
MessageManager.showError(this, ex.getMessage(),
MessageManager.TITLE_MESSAGE);
return true;
- }
+ } catch (GlobusCredentialException ex) {
+ Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE,null,ex);
+ MessageManager.showError(this, ex.getMessage(), MessageManager.TITLE_MESSAGE);
+ return true;
+ } catch (GSSException ex) {
+ Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE,null,ex);
+ MessageManager.showError(this, ex.getMessage(), MessageManager.TITLE_MESSAGE);
+ return true;
+ }
if (comboLoginMode.getSelectedItem().toString()
.equals(IRODSAccount.AuthScheme.PAM.name())) {
@@ -248,7 +293,13 @@ public class LoginDialog extends JDialog {
.getAuthenticatedIRODSAccount());
try {
idropCore.getIdropConfigurationService()
+
.saveLogin(irodsAccount, chkRememberPass.isSelected());
+
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.ACCOUNT_CACHE_PROXY_LOCATION, txtProxy.getText());
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.ACCOUNT_CACHE_CERTIFICATES_LOCATION, txtCerts.getText());
+ //todo save proxy path and certificates location
+
} catch (IdropException ex) {
throw new IdropRuntimeException("error saving irodsAccount", ex);
}
@@ -346,10 +397,17 @@ public class LoginDialog extends JDialog {
jPanel1 = new javax.swing.JPanel();
chkAdvancedLogin = new javax.swing.JCheckBox();
chkGuestLogin = new javax.swing.JCheckBox();
- chkRememberPass = new javax.swing.JCheckBox();
+ chkProxyLogin = new javax.swing.JCheckBox();
lblLoginMode = new javax.swing.JLabel();
comboLoginMode = new javax.swing.JComboBox();
+ lblProxy = new javax.swing.JLabel();
+ txtProxy = new javax.swing.JTextField();
+ lblCerts = new javax.swing.JLabel();
+ txtCerts = new javax.swing.JTextField();
+ btnProxy = new javax.swing.JButton();
+ btnCerts = new javax.swing.JButton();
pnlToolbar = new javax.swing.JPanel();
+ chkRememberPass = new javax.swing.JCheckBox();
btnOK = new javax.swing.JButton();
btnCancel = new javax.swing.JButton();
lblLogin = new javax.swing.JLabel();
@@ -474,38 +532,94 @@ public class LoginDialog extends JDialog {
});
jPanel1.add(chkGuestLogin);
- chkRememberPass.setText("Remember password");
- chkRememberPass.addActionListener(new java.awt.event.ActionListener() {
+ chkProxyLogin.setText("Use GSI");
+ chkProxyLogin.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
- chkRememberPassActionPerformed(evt);
+ chkProxyLoginActionPerformed(evt);
}
});
- jPanel1.add(chkRememberPass);
+ jPanel1.add(chkProxyLogin);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 8;
+ gridBagConstraints.gridy = 10;
pnlLoginInfo.add(jPanel1, gridBagConstraints);
lblLoginMode.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
lblLoginMode.setText("Login Mode:");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 7;
+ gridBagConstraints.gridy = 9;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
pnlLoginInfo.add(lblLoginMode, gridBagConstraints);
comboLoginMode.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Standard", "PAM" }));
comboLoginMode.setToolTipText("Authentication mode used at login");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 7;
+ gridBagConstraints.gridy = 9;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
pnlLoginInfo.add(comboLoginMode, gridBagConstraints);
+ lblProxy.setText("Proxy location:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 7;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlLoginInfo.add(lblProxy, gridBagConstraints);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 7;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ pnlLoginInfo.add(txtProxy, gridBagConstraints);
+
+ lblCerts.setText("Certificates location:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 8;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlLoginInfo.add(lblCerts, gridBagConstraints);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 8;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlLoginInfo.add(txtCerts, gridBagConstraints);
+
+ btnProxy.setText("Choose...");
+ btnProxy.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnProxyActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 7;
+ pnlLoginInfo.add(btnProxy, gridBagConstraints);
+
+ btnCerts.setText("Choose...");
+ btnCerts.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnCertsActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 8;
+ pnlLoginInfo.add(btnCerts, gridBagConstraints);
+
getContentPane().add(pnlLoginInfo, java.awt.BorderLayout.CENTER);
pnlToolbar.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT, 2, 5));
+ chkRememberPass.setText("Remember password");
+ chkRememberPass.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ chkRememberPassActionPerformed(evt);
+ }
+ });
+ pnlToolbar.add(chkRememberPass);
+
btnOK.setMnemonic('L');
btnOK.setText("Login");
btnOK.setMaximumSize(new java.awt.Dimension(100, 100));
@@ -538,6 +652,40 @@ public class LoginDialog extends JDialog {
// TODO add your handling code here:
}//GEN-LAST:event_chkRememberPassActionPerformed
+ private void chkProxyLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkProxyLoginActionPerformed
+ if(chkProxyLogin.isSelected()){
+ chkGuestLogin.setSelected(false);
+ //hide username/pass
+ hideForGuestLogin();
+ showProxyLoginFields();
+ }else{
+ //show username/password
+ showWhenGuestLogin();
+ hideProxyLoginFields();
+ }
+ }//GEN-LAST:event_chkProxyLoginActionPerformed
+
+ private void btnProxyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnProxyActionPerformed
+ final JFileChooser chooser = new JFileChooser();
+ chooser.setFileHidingEnabled(false);
+ int res = chooser.showOpenDialog(this);
+ if(res == JFileChooser.APPROVE_OPTION){
+ if(chooser.getSelectedFile().canRead()){
+ txtProxy.setText(chooser.getSelectedFile().getAbsolutePath());
+ }
+ }
+ }//GEN-LAST:event_btnProxyActionPerformed
+
+ private void btnCertsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCertsActionPerformed
+ final JFileChooser chooser = new JFileChooser();
+ chooser.setFileHidingEnabled(false);
+ chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+ int res = chooser.showOpenDialog(this);
+ if(res == JFileChooser.APPROVE_OPTION){
+ txtCerts.setText(chooser.getSelectedFile().getAbsolutePath());
+ }
+ }//GEN-LAST:event_btnCertsActionPerformed
+
private void chkAdvancedLoginActionPerformed(
final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_chkAdvancedLoginActionPerformed
// TODO add your handling code here:
@@ -551,9 +699,12 @@ public class LoginDialog extends JDialog {
private void chkGuestLoginActionPerformed(
final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_chkGuestLoginActionPerformed
if (chkGuestLogin.isSelected()) {
+ chkProxyLogin.setSelected(false);
+ hideProxyLoginFields();
hideForGuestLogin();
+
} else {
- showWhenGuestLogin();
+ showWhenGuestLogin();
}
}// GEN-LAST:event_chkGuestLoginActionPerformed
@@ -566,57 +717,95 @@ public class LoginDialog extends JDialog {
}// GEN-LAST:event_btnCancelActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btnCancel;
+ private javax.swing.JButton btnCerts;
private javax.swing.JButton btnOK;
+ private javax.swing.JButton btnProxy;
private javax.swing.JCheckBox chkAdvancedLogin;
private javax.swing.JCheckBox chkGuestLogin;
+ private javax.swing.JCheckBox chkProxyLogin;
private javax.swing.JCheckBox chkRememberPass;
private javax.swing.JComboBox comboLoginMode;
private javax.swing.JPanel jPanel1;
+ private javax.swing.JLabel lblCerts;
private javax.swing.JLabel lblHost;
private javax.swing.JLabel lblLogin;
private javax.swing.JLabel lblLoginMode;
private javax.swing.JLabel lblPassword;
private javax.swing.JLabel lblPort;
+ private javax.swing.JLabel lblProxy;
private javax.swing.JLabel lblResource;
private javax.swing.JLabel lblUserName;
private javax.swing.JLabel lblZone;
private javax.swing.JPasswordField password;
private javax.swing.JPanel pnlLoginInfo;
private javax.swing.JPanel pnlToolbar;
+ private javax.swing.JTextField txtCerts;
private javax.swing.JTextField txtHost;
private javax.swing.JTextField txtPort;
+ private javax.swing.JTextField txtProxy;
private javax.swing.JTextField txtResource;
private javax.swing.JTextField txtUserName;
private javax.swing.JTextField txtZone;
// End of variables declaration//GEN-END:variables
private void showAdvancedViewFields() {
- txtResource.setVisible(true);
- txtPort.setVisible(true);
- lblPort.setVisible(true);
- lblResource.setVisible(true);
+ lblHost.setVisible(true);
+ txtHost.setVisible(true);
+ lblZone.setVisible(true);
+ txtZone.setVisible(true);
+ txtResource.setVisible(true);
+ txtPort.setVisible(true);
+ lblPort.setVisible(true);
+ lblResource.setVisible(true);
}
private void hideAdvancedViewFields() {
- txtResource.setVisible(false);
- txtPort.setVisible(false);
- lblPort.setVisible(false);
- lblResource.setVisible(false);
+ lblHost.setVisible(false);
+ txtHost.setVisible(false);
+ lblZone.setVisible(false);
+ txtZone.setVisible(false);
+ txtResource.setVisible(false);
+ txtPort.setVisible(false);
+ lblPort.setVisible(false);
+ lblResource.setVisible(false);
}
private void hideForGuestLogin() {
- lblUserName.setVisible(false);
- txtUserName.setVisible(false);
- lblPassword.setVisible(false);
- password.setVisible(false);
- lblLoginMode.setVisible(false);
- comboLoginMode.setVisible(false);
+ lblUserName.setVisible(false);
+ txtUserName.setVisible(false);
+ lblPassword.setVisible(false);
+ password.setVisible(false);
+ lblLoginMode.setVisible(false);
+ comboLoginMode.setVisible(false);
}
private void showWhenGuestLogin() {
- lblUserName.setVisible(true);
- txtUserName.setVisible(true);
- lblPassword.setVisible(true);
- password.setVisible(true);
+ lblUserName.setVisible(true);
+ txtUserName.setVisible(true);
+ lblPassword.setVisible(true);
+ password.setVisible(true);
}
+
+ private void showProxyLoginFields(){
+ lblProxy.setVisible(true);
+ txtProxy.setVisible(true);
+ btnProxy.setVisible(true);
+ lblCerts.setVisible(true);
+ txtCerts.setVisible(true);
+ btnCerts.setVisible(true);
+ chkRememberPass.setVisible(false);//??
+ }
+
+ private void hideProxyLoginFields(){
+ lblProxy.setVisible(false);
+ txtProxy.setVisible(false);
+ btnProxy.setVisible(false);
+ lblCerts.setVisible(false);
+ txtCerts.setVisible(false);
+ btnCerts.setVisible(false);
+ chkRememberPass.setVisible(true);//??
+ }
+
+
+
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java
index 92efe86..43e7f95 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java
@@ -37,6 +37,10 @@ public interface IdropConfigurationService {
public static final String ACCOUNT_CACHE_USER_SAVE_PASS = "irods.account.savepassword";
public static final String ACCOUNT_CACHE_ROOT_DIR = "irods.account.root.dir";
public static final String ACCOUNT_CACHE_LOGIN_MODE = "irods.account.login.mode";
+ // for GSI
+ public static final String ACCOUNT_CACHE_PROXY_LOCATION = "irods.account.gsi.proxy.location";
+ public static final String ACCOUNT_CACHE_CERTIFICATES_LOCATION = "irods.account.gsi.certificates.location";
+ // /for GSI
public static final String POLICY_AWARE_PROPERTY = "policy.aware";
public static final String LOOK_AND_FEEL = "idrop.lookandfeel";
public static final String TRANSFER_ENGINE_RECORD_SUCCESSFUL_FILES = "transferengine.record.successful.files";
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java
index 5a5d516..f53b1e3 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java
@@ -1,5 +1,5 @@
package org.irods.jargon.idrop.desktop.systraygui.utils;
public final class Version {
public static String VERSION="2.0.1-SNAPSHOT";
- public static String BUILD_TIME="20130731-1333";
+ public static String BUILD_TIME="20130806-0948";
}