Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2012-07-27 06:37:42 -0400
committerGreg Wilkins2012-07-27 06:37:42 -0400
commit7bee81fa82c237a356ad7d46f6caf0ed719b76ba (patch)
treef142082b58db411335c9c9046ca70ec12ca1c3b4 /jetty-security/src
parentacabe78101e242bb84af9514a5a79892298ed63e (diff)
downloadorg.eclipse.jetty.project-7bee81fa82c237a356ad7d46f6caf0ed719b76ba.tar.gz
org.eclipse.jetty.project-7bee81fa82c237a356ad7d46f6caf0ed719b76ba.tar.xz
org.eclipse.jetty.project-7bee81fa82c237a356ad7d46f6caf0ed719b76ba.zip
jetty-9 factoring out HTTP dependencies from connectors
Diffstat (limited to 'jetty-security/src')
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java4
-rw-r--r--jetty-security/src/test/java/org/eclipse/jetty/security/ConstraintTest.java6
-rw-r--r--jetty-security/src/test/java/org/eclipse/jetty/security/DataConstraintsTest.java18
3 files changed, 14 insertions, 14 deletions
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java b/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java
index af1ec146de..c8bb0e2cce 100644
--- a/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java
+++ b/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java
@@ -26,7 +26,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
import org.eclipse.jetty.http.PathMap;
import org.eclipse.jetty.server.HttpChannel;
-import org.eclipse.jetty.server.HttpConnector;
+import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Response;
import org.eclipse.jetty.server.UserIdentity;
@@ -355,7 +355,7 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
return true;
}
- HttpConnector connector = HttpChannel.getCurrentHttpChannel().getHttpConnector();
+ HttpConfiguration connector = HttpChannel.getCurrentHttpChannel().getHttpConfiguration();
if (dataConstraint == UserDataConstraint.Integral)
{
diff --git a/jetty-security/src/test/java/org/eclipse/jetty/security/ConstraintTest.java b/jetty-security/src/test/java/org/eclipse/jetty/security/ConstraintTest.java
index 52ece6f21b..f6259457b6 100644
--- a/jetty-security/src/test/java/org/eclipse/jetty/security/ConstraintTest.java
+++ b/jetty-security/src/test/java/org/eclipse/jetty/security/ConstraintTest.java
@@ -32,7 +32,7 @@ import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.security.authentication.BasicAuthenticator;
import org.eclipse.jetty.security.authentication.FormAuthenticator;
import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.LocalHttpConnector;
+import org.eclipse.jetty.server.LocalConnector;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.UserIdentity;
@@ -55,7 +55,7 @@ public class ConstraintTest
{
private static final String TEST_REALM = "TestRealm";
private static Server _server;
- private static LocalHttpConnector _connector;
+ private static LocalConnector _connector;
private static SessionHandler _session;
private ConstraintSecurityHandler _security;
@@ -63,7 +63,7 @@ public class ConstraintTest
public static void startServer()
{
_server = new Server();
- _connector = new LocalHttpConnector();
+ _connector = new LocalConnector(_server);
_server.setConnectors(new Connector[]{_connector});
ContextHandler _context = new ContextHandler();
diff --git a/jetty-security/src/test/java/org/eclipse/jetty/security/DataConstraintsTest.java b/jetty-security/src/test/java/org/eclipse/jetty/security/DataConstraintsTest.java
index 328b3b6237..90f21b3ab9 100644
--- a/jetty-security/src/test/java/org/eclipse/jetty/security/DataConstraintsTest.java
+++ b/jetty-security/src/test/java/org/eclipse/jetty/security/DataConstraintsTest.java
@@ -23,7 +23,7 @@ import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpScheme;
import org.eclipse.jetty.security.authentication.BasicAuthenticator;
import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.LocalHttpConnector;
+import org.eclipse.jetty.server.LocalConnector;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.UserIdentity;
@@ -44,8 +44,8 @@ import static org.junit.matchers.JUnitMatchers.containsString;
public class DataConstraintsTest
{
private Server _server;
- private LocalHttpConnector _connector;
- private LocalHttpConnector _connectorS;
+ private LocalConnector _connector;
+ private LocalConnector _connectorS;
private SessionHandler _session;
private ConstraintSecurityHandler _security;
@@ -53,13 +53,13 @@ public class DataConstraintsTest
public void startServer()
{
_server = new Server();
- _connector = new LocalHttpConnector();
+ _connector = new LocalConnector(_server);
_connector.setIdleTimeout(300000);
- _connector.setIntegralPort(9998);
- _connector.setIntegralScheme("FTP");
- _connector.setConfidentialPort(9999);
- _connector.setConfidentialScheme("SPDY");
- _connectorS = new LocalHttpConnector()
+ _connector.getHttpConfig().setIntegralPort(9998);
+ _connector.getHttpConfig().setIntegralScheme("FTP");
+ _connector.getHttpConfig().setConfidentialPort(9999);
+ _connector.getHttpConfig().setConfidentialScheme("SPDY");
+ _connectorS = new LocalConnector(_server)
{
@Override

Back to the top