T
Tim Mackey
hi,
i'm using forms authentication with a web service, and i have the web
service passing in the password already encrypted in MD5. can i use any of
the built-in FormsAuthentication methods to authenticate with this password?
it works fine if i pass in the plain text password.
e.g. FormsAuthentication.Authenticate("tim", "pass") works fine, but the
following code does not work, by design of course:
FormsAuthentication.Authenticate("tim", "1A1DC91C907325C69271DDF0C944BC72")
i could always dig into the web.config file myself to access the encrypted
password value but i try to avoid that approach where possible.
thanks
tim
p.s. to anyone wondering about using web services with forms auth, it has
limited use and it's a bit of a workaround, but for my app it is invaluable
and much simpler than a custom security solution. set the LoginUrl in
web.config to the web service itself, add Login() and Logout() web methods
that use FormsAuthentication, enable session state on all the web methods,
set a cookie container on the client proxy object, and for each of the web
methods, do a simple check if(!User.Identity.IsAuthenticated) throw new
UnauthorisedAccessException(), etc.
i'm using forms authentication with a web service, and i have the web
service passing in the password already encrypted in MD5. can i use any of
the built-in FormsAuthentication methods to authenticate with this password?
it works fine if i pass in the plain text password.
e.g. FormsAuthentication.Authenticate("tim", "pass") works fine, but the
following code does not work, by design of course:
FormsAuthentication.Authenticate("tim", "1A1DC91C907325C69271DDF0C944BC72")
i could always dig into the web.config file myself to access the encrypted
password value but i try to avoid that approach where possible.
thanks
tim
p.s. to anyone wondering about using web services with forms auth, it has
limited use and it's a bit of a workaround, but for my app it is invaluable
and much simpler than a custom security solution. set the LoginUrl in
web.config to the web service itself, add Login() and Logout() web methods
that use FormsAuthentication, enable session state on all the web methods,
set a cookie container on the client proxy object, and for each of the web
methods, do a simple check if(!User.Identity.IsAuthenticated) throw new
UnauthorisedAccessException(), etc.