News for hackers. Stuff that matters.
Re:ASP.NET You're doing it Wrong. An Introduction to Nancy by ktavera on Wednesday August 21, 2013 @12:03PM (#6251243)
I started moving a large API we had built on MVC4 over to using WebAPI 2 beta and the attribute routing is amazing. Nancy looks to have similar conventions as far as routing goes but one thing I just couldn't get working properly was authentication. With WebAPI I found it more intuitive to have [SomeCustomAPIAuthenticationAttribute] on controller class and have it look for either an active session (for our browser javascript ajax calls) or if it has none then for an ApiKey (for our mobile apps) in the post data and look up to make sure the api key is valid.

Nancy is cool and i'd definitely consider using it in the future but for now, it was easier to port over our api from MVC4 to a much more familiar structure.

Re:ASP.NET You're doing it Wrong. An Introduction to Nancy by philliphaydon on Wednesday August 21, 2013 @12:12PM (#6251323)
Nancy uses extension methods in placement of Attributes.

Forms auth is done by calling this.RequiresAuthentication(); you can implement an extension method to do an ApiKey check in about 5 lines of code :)

Re:ASP.NET You're doing it Wrong. An Introduction to Nancy by ktavera on Wednesday August 21, 2013 @12:13PM (#6251333)
Thanks for that! I'll have to play around with it again.