views:

39

answers:

2

I have a web site I would like to log in to and display in a WebBrowser control by passing a username and password which the client desktop application already has.

What would be the best and most secure way to go about doing this?

Can I make a Web Service to authenticate and then somehow pass the Session to the browser control? I am using Forms Authentication.

Thanks

+1  A: 

Take a look at OAuth: http://oauth.net/

bshacklett
Has it got less non-trivial since the last time I looked at it?
Graphain
A: 

The WebBrowser control will share the WinInet session of your process. If your application makes an HTTP request to authenticate, and the site sets the proper auth cookie in the session, the WebBrowser control should pick it up properly.

You still have the problem of how to pass the credentials to the website in a secure manner, of course.

Franci Penov