- 通过NuGet在Core项目增加Abp.Zero.Ldap的引用
- 在Core项目中增加MyExternalAuthSource.cs, MyLdapAuthenticationSource.cs, MyLdapSettings.cs
详细内容可找作者联系。
-
修改XXXCoreModule.cs
开始处增加typeof, 并在PreInitialize()增加注入之模块,代码如下:
[DependsOn(typeof(AbpZeroCoreModule),typeof(AbpZeroLdapModule))]
public class DevTaskCoreModule : AbpModule
{
public override void PreInitialize()
{
//Inject LDAP for authentication
IocManager.Register<ILdapSettings, MyLdapSettings>(); //change default setting source
Configuration.Modules.ZeroLdap().Enable(typeof(MyLdapAuthenticationSource));
Configuration.Modules.Zero().UserManagement.ExternalAuthenticationSources.Add<MyExternalAuthSource>();
...... -
在Web项目的Web.config的appSetting节点中增加
<add key="LdapPath" value="LDAP://XX.XXX.COM" />
ABP LDAP 采用域用户登录
最新推荐文章于 2024-07-19 18:12:12 发布