Best way to handle authentication on .NET WCF Web API

tacos_tacos_tacos picture tacos_tacos_tacos · Oct 12, 2011 · Viewed 8.4k times · Source

I'm mildly familiar with DotNetOpenAuth and OAuth in general, but in terms of Web API development, what is the best way to lock down a web service in terms of the following criteria:

  • Ease of implementation
  • Interoperability/compatibility with end-user facing platforms (iOS, Android, Win Phone, Flex...)
  • Whether or not it is clearly standards-based (like OAuth for example)

Thanks!

Answer

Alexander Zeitler picture Alexander Zeitler · Oct 12, 2011

please take a look here: OAuth 2.0 in Web API

Inside the WebApiContrib project there are also Basic Authentication samples which is straight forward but it should not be used without SSL.