创建使用DotNetOpenAuth一个OAuth 2.0服务提供商 [英] Create an OAuth 2.0 service provider using DotNetOpenAuth
问题描述
我建立一个web应用程序,这将有一个API和使用DotNetOpenAuth的授权服务。我发现这个例子有关如何使用已经存在的服务供应商授权,但我想就如何落实它可以创建令牌服务提供商为例,他们坚持做评估。是否有任何大文章或样品提供者,我可以下载?
I'm building a web app which will have an api and an authorization service using DotNetOpenAuth. I found this example on how you can authorize using a service provider that already exists but I would like an example on how to implement a service provider that can create tokens, persist them and do evaluation. Is there any great articles or sample providers that I can download?
推荐答案
的更新的
DotNetOpenAuth 已经改变,因为这是最初公布。我强烈建议你遵循Ashish的意见和看看样品。它包含code写的授权服务器,资源服务器和客户机的所有主要流向。
DotNetOpenAuth has moved on since this was initially posted. I strongly suggest you follow Ashish's advise and take a look at the samples. It contains code to write Authorization Servers, Resource Servers and Clients for all the major flows.
如果您想要一个pre内置解决方案,开源$ C $ C
Thinktecture的Identity Server是一个开源.NET安全性令牌服务。它支持多种终端进行认证,包括OAuth 2.0用户承载的令牌。
Thinktecture Identity Server is an Open Source .NET security token service. It supports a number of endpoints for authentication including OAuth 2.0 Bearer tokens.
的更新的这个Thinktecture身份服务器现在是在 2版和支持这些OAuth 2.0流程的
Update this Thinktecture Identity Server is now on version 2 and supports these OAuth 2.0 flows
- 资源所有者密码凭据流量
- 隐流和放大器; JavaScript的
- 授权code流量
再看看在code,看它是如何做的一切,有样本的此处展示如何下探它
again take a look at the code to see how it was all done and there are samples here to show how to plumb it in.
我希望这有助于 - 这些图书馆和例子都非常帮助我们在过去几个月
I hope this helps - these library's and examples have hugely helped us over the past few months.
的更新的
还有另一个例子警告,它看起来过时了一个简单的OAuth提供者MVC <一的 href=\"http://community.$c$csmithtools.com/$c$cSmith_Community/b/tdupont/archive/2011/03/18/oauth-2-0-for-mvc-two-legged-implementation.aspx\">here示例code <一个href=\"http://$c$c.google.com/p/$c$csmith/downloads/detail?name=OAuth2.zip&can=2&q=#makechanges\">here
There is also another example warning, it looks dated of a simple OAuth provider for MVC here Sample code here
这篇关于创建使用DotNetOpenAuth一个OAuth 2.0服务提供商的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!