Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/net/AuthenticatedProxy.java')
-rw-r--r--org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/net/AuthenticatedProxy.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/net/AuthenticatedProxy.java b/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/net/AuthenticatedProxy.java
index bf417ad8..d2d0477d 100644
--- a/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/net/AuthenticatedProxy.java
+++ b/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/net/AuthenticatedProxy.java
@@ -14,10 +14,13 @@ package org.eclipse.mylyn.commons.core.net;
import java.net.Proxy;
import java.net.SocketAddress;
+import org.eclipse.core.runtime.Assert;
+
/**
* Abstraction for a proxy that supports user authentication.
*
* @author Rob Elves
+ * @author Steffen Pingel
* @since 3.7
*/
public class AuthenticatedProxy extends Proxy {
@@ -26,10 +29,19 @@ public class AuthenticatedProxy extends Proxy {
private final String password;
- public AuthenticatedProxy(Type type, SocketAddress sa, String userName, String password) {
+ private final String domain;
+
+ public AuthenticatedProxy(Type type, SocketAddress sa, String userName, String password, String domain) {
super(type, sa);
+ Assert.isNotNull(userName);
+ Assert.isNotNull(password);
this.userName = userName;
this.password = password;
+ this.domain = domain;
+ }
+
+ public AuthenticatedProxy(Type type, SocketAddress sa, String userName, String password) {
+ this(type, sa, userName, password, null);
}
public String getUserName() {
@@ -40,4 +52,8 @@ public class AuthenticatedProxy extends Proxy {
return password;
}
+ public String getDomain() {
+ return domain;
+ }
+
}

Back to the top