Hello,
Pls find below my query of CXF-RS with Basic authentication:
public void configure() throws Exception {
System.out.println("inside route....");
Map<String, Object> properties = new HashMap<String, Object>();
AuthorizationPolicy authPolicy = new AuthorizationPolicy();
authPolicy.setAuthorizationType(HttpAuthHeader.AUTH_TYPE_BASIC);
authPolicy.setUserName("test");
authPolicy.setPassword("test");
authPolicy.setAuthorization("true");
// properties.put(AuthorizationPolicy.class.getName(), authPolicy);
properties.put("org.apache.cxf.configuration.security.AuthorizationPolicy",
authPolicy);
CxfRsEndpoint myCxfEp =
(CxfRsEndpoint)getContext().getEndpoint("cxfrs:http://0.0.0.0:9090?resourceClasses=com.test.CompanyService&bindingStyle=SimpleConsumer");
myCxfEp.configureProperties(properties);
from(myCxfEp)
...
I have tested it using SOAPUI doesn't ask for any authentication.
Please suggest ..
Thanks,
Sayed
--
View this message in context:
http://camel.465427.n5.nabble.com/HTTP-Basic-Authentication-tp5742229p5756208.html
Sent from the Camel - Users mailing list archive at Nabble.com.