use of org.apache.camel.component.http4.handler.AuthenticationValidationHandler in project camel by apache.
the class HttpAuthenticationTest method setUp.
@Before
@Override
public void setUp() throws Exception {
localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor()).setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory()).setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext()).registerHandler("/search", new AuthenticationValidationHandler("GET", null, null, getExpectedContent(), user, password)).create();
localServer.start();
super.setUp();
}
use of org.apache.camel.component.http4.handler.AuthenticationValidationHandler in project camel by apache.
the class HttpsAuthenticationTest method setUp.
@Before
@Override
public void setUp() throws Exception {
localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor()).setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory()).setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext()).registerHandler("/", new AuthenticationValidationHandler("GET", null, null, getExpectedContent(), user, password)).create();
localServer.start();
super.setUp();
}
use of org.apache.camel.component.http4.handler.AuthenticationValidationHandler in project camel by apache.
the class CamelComponentVerifierTest method setUp.
@Before
@Override
public void setUp() throws Exception {
localServer = ServerBootstrap.bootstrap().setHttpProcessor(getHttpProcessor()).registerHandler("/basic", new BasicValidationHandler("GET", null, null, getExpectedContent())).registerHandler("/auth", new AuthenticationValidationHandler("GET", null, null, getExpectedContent(), AUTH_USERNAME, AUTH_PASSWORD)).registerHandler("/redirect", redirectTo(HttpStatus.SC_MOVED_PERMANENTLY, "/redirected")).registerHandler("/redirected", new BasicValidationHandler("GET", null, null, getExpectedContent())).create();
localServer.start();
super.setUp();
}
Aggregations