views:

68

answers:

3

My MVC site is using integrated authentication, and we had a request to allow users to sing in as another user, like in sharepoint.

This has proved to be difficult...
I've tried to send a 401 or 403 response, but the browser won't display the login popup and the user will continue to be loged in. (Fidler and firebug tell me that the response code is received)

How can I clear the credentials for the user, so he/she can provide another user/password?

A: 

FormsAuthentication.SignOut();

Hm, that's about forms authentication but I'm not sure it's what you use; but anyway.

queen3
nop, Integrated Authentication = Windows Authentication
David Lay
A: 

According to this the way to go is implementing forms authentication, check the provided credentials against AD, and then impersonate.

I'm still looking for a way to do it without implementing forms auth...

David Lay
A: 

Similar questions have been asked before, e.g. http://stackoverflow.com/questions/1524596/prompt-for-login-details-when-using-integrated-windows-authentication

This one may provide an kludge: redirection to SSL seems to cause a re-AuthN. Maybe you can do something similar? http://stackoverflow.com/questions/1596329/integrated-windows-authentication-ssl

serialhobbyist