Web API 身份验证最佳实践 [英] Web API Authentication best practice

查看:37
本文介绍了Web API 身份验证最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑到数据安全性至关重要且 ASP.NET 应用程序在 Azure 上运行,哪一种是 Web API 的最佳身份验证方法?

Which one is the best authentication approach for an Web API, considering that the data security is essential and the ASP.NET application runs on Azure?

推荐答案

在处理身份验证和保护 Web API 时,我建议您遵循 Dominick Baier 设置的准则.世界上可能没有比 ASP.NET 身份管理更好的专家了.

When dealing with authentication and securing your Web API I recommend you follow the guidelines set by Dominick Baier. There might be no better expert on ASP.NET identity management in the world.

您可以在 http://leastprivilege.com/ 上找到他的博客,并在 Nuget 上找到一个很棒的 Web API 身份包, Thinktecture.IdentityModel - http://nuget.org/packages/Thinktecture.IdentityModel与大多数优秀的开源库一样,由于您可以免费使用所有功能,因此无需重新发明轮子.

You can find his blog at http://leastprivilege.com/ and a great Web API Identity package at Nuget, Thinktecture.IdentityModel - http://nuget.org/packages/Thinktecture.IdentityModel As with most of the good open source libraries, since all the functionality is available for your for free, there is no need to reinvent the wheel.

这是一个自上而下的身份&适用于 .NET 4.0/WIF 和 .NET 4.5 的访问控制库(包括对 MVC 和 Web API 的支持).

This is a top-to-bottom identity & access control library for .NET 4.0/WIF and .NET 4.5 (including support for MVC and Web API).

如果您想了解有关保护 Web API 的更多信息,您还应该观看此视频 http://vimeo.com/43603474 - 多米尼克在 2012 年奥斯陆 NDC 上的演讲.

If you want to learn more about securing your Web API, you should also watch this video http://vimeo.com/43603474 - Dominick's talk from NDC Oslo 2012.

这篇关于Web API 身份验证最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆