• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How are you supposed to supply user/password to a web service ?

 
Sol Mayer-Orn
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


I need to write a webService with authentication.
Namely: client applications must supply username + password ( which will be checked against our LDAP server ).

I'm new to this, so I'd appreciated it if someone could tell: how should my clients supply the password ?
- Is it customary to supply the username+password through standard HTTP headers (say, 'basic authentication') ?
- Or, is it handled by the webServices/security spec ? Does the < soap:Envelope > message structure keep a dedicated tag for user/password info ? Something like:

<soap:Envelope...>
...
< ! -- dummy tag! -- >
<login user='jelly' password='secret' />
</soap:Envelope...>


Thanks very much.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll blatantly advertise an article I wrote for the JavaRanch Journal on Web Services Authentication. It explains authentication using both HTTP and WS-Security with example code. You can find it here.
 
Sol Mayer-Orn
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, great article !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic