目前我正在开发一些基础设施,并且已经实现了自己的 RESTful 身份验证机制。
现在我想到,也许我不应该走这条路并使用行业标准,因此与我的项目的互操作性在身份验证和授权方面可能很琐碎并且更容易理解。
在检查了一些文章谷歌搜索并阅读了 Stackoverflow 中的一些问答后,我没有找到如何成为 OpenID 提供商 - 我不是在谈论使用 Google、Windows 对用户进行身份验证Live、Facebook Connect 等,我想开发一个支持 OpenID 的系统,这样如果有人想注册我的服务,他们就可以在我自己的域中进行 -。
实际上我的问题是:任何人都可以成为 OpenID 提供商吗?DotNetOpenAuth 是一个在您自己的基础设施中开发此协议的库吗?
谢谢。
Currently I'm developing some infrastructure and I've implemented my own RESTful authentication mechanism.
Now I've in mind that maybe I shouldn't go this way and use an industry standard so interoperability with my project could be trivial and easier to understand in terms of authentication and authorization.
After checking some articles googling everywhere and reading some Q&A here in Stackoverflow, I don't find how to be an OpenID provider - I'm not talking about authenticate users using Google, Windows Live, Facebook Connect and so, I want to develop an OpenID-enabled system so if some want to register into my services, they'll do in my own domain -.
Actually my question is: can anyone become an OpenID provider and is DotNetOpenAuth a library to develop this protocol in your own infrastructure?
Thank you.
发布评论
评论(3)
开发 OpenID 提供程序作为组织网站环内的单点登录 (SSO) 手段是一个非常有效的方案。 DotNetOpenAuth 附带两个示例网站(提供者和依赖方),用于演示单点登录关系。它们称为 OpenIdWebRingSsoProvider 和 OpenIdWebRingSsoRelyingParty。
请不要尝试自己实现 OpenID,就像尝试自己实现 SSL 一样。获得正确的 OpenID 安全性和互操作性需要很长时间和深厚的领域知识。 DotNetOpenAuth 特别为您提供了编程访问权限,可以使用 OpenID 执行您想要执行的任何操作,而且由于它是免费的,因此很难出错。
披露:我是 DotNetOpenAuth 背后的开发人员。
Developing an OpenID Provider as a means of Single-Sign-On (SSO) within an organizations ring of web sites is a very valid scenario. DotNetOpenAuth comes with a pair of sample web sites (a Provider and a Relying Party) that demonstrate a single-sign-on relationship. They're called OpenIdWebRingSsoProvider and OpenIdWebRingSsoRelyingParty.
Please do not attempt to implement OpenID by yourself any more than you'd implement SSL by yourself. Getting OpenID security and interoperability just right takes a very long time and a deep level of domain knowledge. DotNetOpenAuth in particular gives you programmatic access to do just about anything you'd want to with OpenID, and since it's free, it's hard to go wrong.
Disclosure: I am a developer behind DotNetOpenAuth.
如果你认为你可以做到,你可以按照以下步骤操作:
但我的问题始终是:
为什么还要多一个提供商? Facebook、Google、MyOpenID,...已经拥有它,并且有了它们,很多用户都拥有(即使他们不知道)OpenID 登录...
StackExchange 很久以前就是一个 OpenID 提供商,但是...许多用户跨 StackExchange 平台。 您是否正在开发如此大的社区,因此创建和实施您自己的提供程序是否合理?
if you're think you can do it, you can follow this:
But my question would always be:
Why one more provider? Facebook, Google, MyOpenID, ... already have it, and with them, plenty of users have (even without them knowing) an OpenID login...
StackExchange is an OpenID provider since a while ago, but... there's so much users cross StackExchange platform. Are you developing such a big community so it will be reasonable to create and implement your own provider?
我看到答案已经有几年了。如果您正在寻找使用 Microsoft 技术堆栈构建 OpenID 提供商的最新解决方案,IdentityServer 是开源选项。人们可以使用它来构建一个 Open ID 连接身份提供商。
有关如何使用和构建的文档:https://identityserver4.readthedocs.io/en/latest/< /a>
IdentityServer4 是适用于 ASP.NET Core 2 的 OpenID Connect 和 OAuth 2.0 框架。
它在您的应用程序中支持以下功能:
身份验证即服务
所有应用程序(Web、本机、移动、服务)的集中登录逻辑和工作流程。 IdentityServer 是 OpenID Connect 的官方认证实现。
单点登录/退出
在多种应用程序类型上进行单点登录(和退出)。
API 访问控制
为各种类型的客户端(例如服务器到服务器、Web 应用程序、SPA 和本机/移动应用程序)颁发 API 访问令牌。
联合网关
支持外部身份提供商,如 Azure Active Directory、Google、Facebook 等。这可以使您的应用程序免受如何连接到这些外部提供商的详细信息的影响。
专注于定制
最重要的部分 - IdentityServer 的许多方面都可以定制以满足您的需求。由于 IdentityServer 是一个框架,而不是盒装产品或 SaaS,因此您可以编写代码来按照对您的场景有意义的方式调整系统。
成熟的开源
IdentityServer 使用宽松的 Apache 2 许可证,允许在其之上构建商业产品。它也是 .NET 基金会的一部分,提供治理和法律支持。
I see the answers are couple of years old. If you are looking for the latest solution to build an OpenID provider using Microsoft technology stack, IdentityServer is the open source option. One can use this and build an Open ID connect Identity provider.
Documentation on how to use and build : https://identityserver4.readthedocs.io/en/latest/
IdentityServer4 is an OpenID Connect and OAuth 2.0 framework for ASP.NET Core 2.
It enables the following features in your applications:
Authentication as a Service
Centralized login logic and workflow for all of your applications (web, native, mobile, services). IdentityServer is an officially certified implementation of OpenID Connect.
Single Sign-on / Sign-out
Single sign-on (and out) over multiple application types.
Access Control for APIs
Issue access tokens for APIs for various types of clients, e.g. server to server, web applications, SPAs and native/mobile apps.
Federation Gateway
Support for external identity providers like Azure Active Directory, Google, Facebook etc. This shields your applications from the details of how to connect to these external providers.
Focus on Customization
The most important part - many aspects of IdentityServer can be customized to fit your needs. Since IdentityServer is a framework and not a boxed product or a SaaS, you can write code to adapt the system the way it makes sense for your scenarios.
Mature Open Source
IdentityServer uses the permissive Apache 2 license that allows building commercial products on top of it. It is also part of the .NET Foundation which provides governance and legal backing.