开发者

Authentication with OpenRasta

I'm trying to use OpenRasta for a simple RESTful service. This service needs to be secured with either http Basic authentication or (preferably) Digest.

Looking around the net, there are tens of webpages writing how wonderful OpenRasta is and that it even supports Digest authentication but I haven't been able to find a single example of how to enable either of those for my service.

Putting a RequiresAuthentication on my method or handler doesn't seem to be doing anything.

Has anyone actually done this ever before? Or is it just a dream开发者_Go百科ware?

UPDATE: I gave up on getting to work and went with Scott Littlewoods fork of OpenRasta. He has changed the way authentication works and using his implementation, I managed to do both Basic and Digest.


I've put together a small blog post and sample application to show how to enable Digest Authentication using the current RTM of OpenRasta.

http://scottondotnet.blogspot.com/2010/10/openrasta-digest-authentication.html

The source code can be found here: http://github.com/scottlittlewood/OpenRastaDigestDemo


Look at the classes in OpenRasta.Security. THere's an IAuthenticationProvider you need to implement and register in the container for digest to kick in.

Check the debug log if after doing this it still doesn't work, and send a copy of it on the mailing lists, people there will be able to help you.


I think the issue is with the use of Cassini (built in to VS.NET) to debug. Cassini doesn't support authentication like IIS does. When I switched to using IIS it began to prompt me for authentication.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜