[英]How to secure Cxf jax-ws webservice?
I am new in web services. 我是Web服务的新手。 I have created web services using spring with CXF jax-ws implementation. 我已经使用spring和CXF jax-ws实现创建了Web服务。 Suppose I have " HelloWebService
" in that I have webmethod " sayHello()
" which will return string. 假设我有“ HelloWebService
”,因为我有web方法“ sayHello()
”,它将返回字符串。
when I hit url: 当我点击网址时:
localhost:8080/ProjName/service/HelloWebService?wsdl
It shows me wsdl on browser. 它在浏览器上显示了wsdl。
Now, I want to ask username and password
when user hit this url on browser. 现在,当用户在浏览器中点击此URL时,我想询问username and password
。
How can I do this? 我怎样才能做到这一点?
I partially understand you but I think you would like to make a rest authentication. 我对您有部分了解,但我想您想进行一次身份验证。 I had to do similar some months ago, and I came across this answer. 几个月前,我不得不做类似的事情,而我遇到了这个答案。 stackoverflow answer stackoverflow答案
to make your URL password protected in Spring 在Spring中保护您的URL密码
you can use authentication-manager tag in spring.xml (your spring config file) 您可以在spring.xml(您的spring配置文件)中使用authentication-manager标记
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.