Is it possible to authenticate single web service methods instead of the
whole service?
Currently I am using the following code for authorization, but this
authorizes the whole service, but there are some methods which don't need an
authorization and which do noit work when I set it.
Has anybody an idea? Thank you!
this.factory.setServiceClass(c);
this.factory.setAddress(serviceAddress);
final T service = (T) this.factory.create(c);
if (useAuthorization)
{
final Client client = ClientProxy.getClient(service);
final Endpoint endpoint = client.getEndpoint();
final Map<String, Object> properties = new HashMap<String,
Object>();
properties.put(WSHandlerConstants.ACTION,
WSHandlerConstants.USERNAME_TOKEN);
properties.put(WSHandlerConstants.USER, "user");
properties.put(WSHandlerConstants.PASSWORD_TYPE,
getPasswordType());
properties.put(WSHandlerConstants.PW_CALLBACK_REF, new
WebServicePasswordHandler(password));
final WSS4JOutInterceptor wssOut = new
WSS4JOutInterceptor(properties);
endpoint.getOutInterceptors().add(wssOut);
}
--
View this message in context:
http://cxf.547215.n5.nabble.com/Authenticate-single-methods-instead-of-whole-service-tp5693056.html
Sent from the cxf-user mailing list archive at Nabble.com.