This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes How are you supposed to supply user/password to a web service ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "How are you supposed to supply user/password to a web service ?" Watch "How are you supposed to supply user/password to a web service ?" New topic
Author

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

Sol Mayer-Orn
Ranch Hand

Joined: Nov 13, 2002
Posts: 311
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
Marshal

Joined: Mar 22, 2005
Posts: 41020
    
  43
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.


Ping & DNS - my free Android networking tools app
Sol Mayer-Orn
Ranch Hand

Joined: Nov 13, 2002
Posts: 311
Thanks, great article !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How are you supposed to supply user/password to a web service ?
 
Similar Threads
Tomcat 6.0.32 HTTP Status 403 - Access to the requested resource has been denied
encoding in java
SOAP question
xml and base64 encode help
Displaying JSP in certain DIV tag