由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - Web Service的Basic Anthentication是怎么一回事?
相关主题
How to user Perl to handle object on client side?CGI question: prefilled value in webpage
web services的安全性问题。phpBB3自动注册
有JAVA底子学习web service那些库或者framework有没有什么好方法如何修改router密码
wsdl toolFileZilla versus sftp
SOAP流行哪种,contract first,contract last,每种里面流行哪种?java和c#分别说说。总有一天,web server上的开发会退化成xml的
Python哪个library可以快速建个soap web service?请问const myClass &src 和myClass const &src有什么区别?
问个programming style 的问题a question about const reference
有没有可以自动check email的软件?一个partial specialization的问题
相关话题的讨论汇总
话题: basic话题: web话题: service话题: username话题: password
进入Programming版参与讨论
1 (共1页)
s****y
发帖数: 503
1
我要访问一个有安全认证的Web Service,他们提供了SOAP和WSDL,我在SoapUI里,输
入了username和password,能得到响应,他们说Web Service用的是Basic的认证。那么
username和password是怎么传输的?是http://xxx/xxxService?userId=&password=这样?还是存在SOAP报文里?
还有在我用wsimport生成的客户端代码里怎么处理username和password?我在哪里输入
username和password?
l**********n
发帖数: 8443
2
这个简单吧,就是弹出个dialog,要求输入用户名,密码
s****y
发帖数: 503
3

用网页直接访问是这样,在SoapUI里也有地方输入密码和用户名,但是在wsimport生成
的客户端的代码里怎么处理username和password?

【在 l**********n 的大作中提到】
: 这个简单吧,就是弹出个dialog,要求输入用户名,密码
l**********n
发帖数: 8443
4
add a header

【在 s****y 的大作中提到】
:
: 用网页直接访问是这样,在SoapUI里也有地方输入密码和用户名,但是在wsimport生成
: 的客户端的代码里怎么处理username和password?

c*********e
发帖数: 16335
5
rt

【在 l**********n 的大作中提到】
: add a header
s****y
发帖数: 503
6

是给Http加个header,然后写入username=XXX password=XXX?

【在 l**********n 的大作中提到】
: add a header
g*****g
发帖数: 34805
7
If you are using SOAP, you should use a web service client, and it should
have examples.
I don't think username/password should be passed in header.

【在 s****y 的大作中提到】
:
: 是给Http加个header,然后写入username=XXX password=XXX?

c*********e
发帖数: 16335
8
en,而且,c#,java的soap的写法也不同。找个例子,改改就成你的了。

【在 g*****g 的大作中提到】
: If you are using SOAP, you should use a web service client, and it should
: have examples.
: I don't think username/password should be passed in header.

l******t
发帖数: 55733
9
Http标准定义的。查一下就标准就知道了。
a*********y
发帖数: 63
10
正确。
HTTP Basic Authentication 在 SOAP Authentication 之前。如果你通不过认证,你
看不见SOAP Endpoint.这是一种常见的保护 Web Service 的方式。

【在 s****y 的大作中提到】
:
: 是给Http加个header,然后写入username=XXX password=XXX?

相关主题
Python哪个library可以快速建个soap web service?CGI question: prefilled value in webpage
问个programming style 的问题phpBB3自动注册
有没有可以自动check email的软件?如何修改router密码
进入Programming版参与讨论
a****i
发帖数: 1182
11
这个是挺标准的OAuth2吧
用token啊

【在 s****y 的大作中提到】
: 我要访问一个有安全认证的Web Service,他们提供了SOAP和WSDL,我在SoapUI里,输
: 入了username和password,能得到响应,他们说Web Service用的是Basic的认证。那么
: username和password是怎么传输的?是http://xxx/xxxService?userId=&password=这样?还是存在SOAP报文里?
: 还有在我用wsimport生成的客户端代码里怎么处理username和password?我在哪里输入
: username和password?

a9
发帖数: 21638
12
这怎么会是oauth2。
http://lmgtfy.com/?q=http+basic+authentication

,输
那么
输入

【在 a****i 的大作中提到】
: 这个是挺标准的OAuth2吧
: 用token啊

a****i
发帖数: 1182
13
哦,没看清题,以为是要选一个技术来实现
不过我的意思是说web service 是用token而不是username/password来做security
从wiki来看,Basic也是在头里发个 Authorization: Basic aHR0cHdhdGNoOmY=
用户名和密码用来拿token,拿到以后就不需要了,是这样吧?

【在 a9 的大作中提到】
: 这怎么会是oauth2。
: http://lmgtfy.com/?q=http+basic+authentication
:
: ,输
: 那么
: 输入

g*****g
发帖数: 34805
14
authenticated之后会发个session cookie.

【在 a****i 的大作中提到】
: 哦,没看清题,以为是要选一个技术来实现
: 不过我的意思是说web service 是用token而不是username/password来做security
: 从wiki来看,Basic也是在头里发个 Authorization: Basic aHR0cHdhdGNoOmY=
: 用户名和密码用来拿token,拿到以后就不需要了,是这样吧?

o*********r
发帖数: 203
15
Add header to call (i.e. in jQuery):
$.ajax({url : ,
type : 'get',
contentType : 'application/json',
dataType : 'json',
cache : false,
headers : {'Authorization' : "Basic cmVtb3RlMTpyZW1vdGUx"}};
'cmVtb3RlMTpyZW1vdGUx' is a base64-encoded string. The plain text is <
username>:
f*********t
发帖数: 17
16
Right. This is http standard header.
If using oauth the header becomes Authorization: Bearer {access_token}

【在 a****i 的大作中提到】
: 哦,没看清题,以为是要选一个技术来实现
: 不过我的意思是说web service 是用token而不是username/password来做security
: 从wiki来看,Basic也是在头里发个 Authorization: Basic aHR0cHdhdGNoOmY=
: 用户名和密码用来拿token,拿到以后就不需要了,是这样吧?

1 (共1页)
进入Programming版参与讨论
相关主题
一个partial specialization的问题SOAP流行哪种,contract first,contract last,每种里面流行哪种?java和c#分别说说。
help- date is incorrectly converted when read csv using vba in excelPython哪个library可以快速建个soap web service?
C++ Template Question问个programming style 的问题
C++ Q06: POD versus Aggregate-type有没有可以自动check email的软件?
How to user Perl to handle object on client side?CGI question: prefilled value in webpage
web services的安全性问题。phpBB3自动注册
有JAVA底子学习web service那些库或者framework有没有什么好方法如何修改router密码
wsdl toolFileZilla versus sftp
相关话题的讨论汇总
话题: basic话题: web话题: service话题: username话题: password