Search in sources :

Example 1 with AuthenticationValidationHandler

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();
}
Also used : AuthenticationValidationHandler(org.apache.camel.component.http4.handler.AuthenticationValidationHandler) Before(org.junit.Before)

Example 2 with AuthenticationValidationHandler

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();
}
Also used : AuthenticationValidationHandler(org.apache.camel.component.http4.handler.AuthenticationValidationHandler) Before(org.junit.Before)

Example 3 with AuthenticationValidationHandler

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();
}
Also used : AuthenticationValidationHandler(org.apache.camel.component.http4.handler.AuthenticationValidationHandler) BasicValidationHandler(org.apache.camel.component.http4.handler.BasicValidationHandler) Before(org.junit.Before)

Aggregations

AuthenticationValidationHandler (org.apache.camel.component.http4.handler.AuthenticationValidationHandler)3 Before (org.junit.Before)3 BasicValidationHandler (org.apache.camel.component.http4.handler.BasicValidationHandler)1