summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2009-10-03 16:52:33 -0700
committerShawn O. Pearce <spearce@spearce.org>2009-11-02 17:55:52 -0800
commit9108035763f7d9504671bc9bbddfb467100095e7 (patch)
treec6a61bfed044332d633f22cbb46f0169ff8d089c /org.eclipse.jgit.pgm
parente336bad367516c593699d42100cf1654059ee7c7 (diff)
downloadjgit-9108035763f7d9504671bc9bbddfb467100095e7.tar.gz
jgit-9108035763f7d9504671bc9bbddfb467100095e7.zip
Refactor the cached Authenticator data out of AwtAuthenticator
This makes it easier to swap out authenticator implementations and yet still rely upon being able to configure at least one Authenticator instance in the JVM and program it with data obtained from outside of the user interface. Change-Id: I8c1a0eb8acee1d306f4c3b40a790b7fa0c3abb70 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r--org.eclipse.jgit.pgm/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java6
2 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
index 4d0bacc664..fe59357ab8 100644
--- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
@@ -16,6 +16,7 @@ Import-Package: org.eclipse.jgit.awtui,
org.eclipse.jgit.transport,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.treewalk.filter,
+ org.eclipse.jgit.util,
org.kohsuke.args4j,
org.kohsuke.args4j.spi
Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
index 281e2f3894..7c74ee5480 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
@@ -55,6 +55,7 @@ import org.eclipse.jgit.errors.TransportException;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.pgm.opt.CmdLineParser;
import org.eclipse.jgit.pgm.opt.SubcommandHandler;
+import org.eclipse.jgit.util.CachedAuthenticator;
import org.kohsuke.args4j.Argument;
import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.ExampleMode;
@@ -215,8 +216,9 @@ public class Main {
final int c = userpass.indexOf(':');
final String user = userpass.substring(0, c);
final String pass = userpass.substring(c + 1);
- AwtAuthenticator.add(new AwtAuthenticator.CachedAuthentication(
- proxyHost, proxyPort, user, pass));
+ CachedAuthenticator
+ .add(new CachedAuthenticator.CachedAuthentication(
+ proxyHost, proxyPort, user, pass));
}
}
}