.NET 中 CAS Shibboleth 的 MembershipProvider
是否可以在 .NET 中为 CAS Shibboleth 编写 MembershipProvider?
Is it possible to write a MembershipProvider in .NET for CAS Shibboleth?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当想要更改数据源(从 sql 到 xml)时,您通常使用自定义 MembershipProvider。通过实现 MembershipProvider,您可以重写 Providerbase 方法并进行更改,例如,Membership 将验证用户是否存在或其存储位置。
所以答案是可以,但也有一些缺点。 Asp.Net 中的成员身份通常是应用程序的一部分,并且应该在同一域中运行,这与身份验证机制(如 OpenId 或 Shibboleth)不同。这意味着您可以将 MembershipProvider 包裹起来Shibboleth 但您最终可能会得到该提供程序不支持的某些方法(例如重置密码功能)。在应用程序的您一侧拥有会员资格数据提供程序可确保您完全控制它。您可以在网站上使用 Asp.Net 会员资格来管理用户/角色、登录/注销并将 Shibboleth 集成为外部身份验证服务。尝试看看 DotNetOpenAuth 的工作原理。
You usually use a custom MembershipProvider when want to change the data source (es from sql to xml). By implementing a MembershipProvider you can override the Providerbase methods and change, for instance, where the Membership will verify if a user exists or where its stores it.
So the answer is yes you can, there are a few drawbacks though. Membership in Asp.Net is usually part of the application and should run in the same domain, differently from an Authentication mechanism (like OpenId or Shibboleth). This means that you can wrap your MembershipProvider around Shibboleth but you could end up with having some methods that are not supported by this provider (the reset password function for instance). Having the data provider for Membership on your side of the app ensure you got full control over it. You can use the Asp.Net membership on your website in order to manage users/roles, login/logouts and integrate Shibboleth as an external authentication service. Try giving a look at how DotNetOpenAuth works.