通过LDAP身份验证ASP.NET身份的角色管理 [英] ASP.NET Identity Role management through LDAP Authentication

查看:397
本文介绍了通过LDAP身份验证ASP.NET身份的角色管理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Visual Studio 2013,并已经开发了一个应用程序MVC5。我已实施了使用的LocalDB与ASP.NET身份验证和授权应用程序。我现在已经改成了对LDAP我已经成功地实施了验证。现在我需要用身份仍然管理用户角色,但我不能似乎找到了 IdentityModel.cs 还是的AccountController <任何相关code / code>,可以点我就如何调整我的应用程序通过LDAP认证和通过Identity授权正确的方向。

I am using Visual Studio 2013 and have developed an MVC5 application. I had implemented the application to use LocalDB with ASP.NET Identity for authentication and authorization. I have now changed it to authenticate against LDAP which I have successfully implemented. Now I need to manage user roles still with identity but I cant seem to find any relevant code in the IdentityModel.cs nor the AccountController that can point me in the right direction on how to tweak my application to authenticate through LDAP and authorize through Identity.

推荐答案

在存储LDAP中的作用,以及 - 这不是火箭手术和角色 - > getmembers和用户 - > ...的memberOf这将是双向的。只要创建一个名为角色容器。然后创建为您的应用程序的每个角色组..添加用户作为该组的成员.. ---

Store the roles in LDAP as well - it's not rocket surgery and roles -> getmembers and user -> memberof... it'll work both ways. Just create a Container called "Roles". Then create "Groups" for each role in your app.. Add users as members of the group.. ---

这篇关于通过LDAP身份验证ASP.NET身份的角色管理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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