The configuration only work for the client side, if you want to enable the HTTP Basic Authentication on the server side, you need to setup the Jetty ServletContextHandler for it.
-- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On September 9, 2014 at 1:26:41 PM, sayed_india (sayed.abdulis...@gmail.com) wrote: > Hello, > > Pls find below my query of CXF-RS with Basic authentication: > > public void configure() throws Exception { > System.out.println("inside route...."); > Map properties = new HashMap(); > 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. >