I would like to integrate authentication via Active Directory in my .net Core app using Free Startup Template version of the Boilerplate. I followed the instruction in the documentation such as installing Abp.Zero.Ldap
package, creating LdapAuthenticationSource
class, and injecting dependency like:
[DependsOn(typeof(AbpZeroLdapModule))]
public class MyApplicationCoreModule : AbpModule
{
public override void PreInitialize()
{
Configuration.Modules.ZeroLdap().Enable(typeof (MyLdapAuthenticationSource));
}
...
}
Do I need to define any custom settings by using a class implementing ILdapSettings
interface? Or create any class or files referencing to this folder?
.NET Core 2.0
The instructions may not work, as LDAP / AD auth extension for .NET Core isn't implemented yet.
Track this feature: https://github.com/aspnetboilerplate/aspnetboilerplate/issues/2755
.NET Framework 4.6.1
By installing
Abp.Zero.Ldap
package, you're already referencing that module (moved here).As mentioned in LDAP/Active Directory > Settings:
So, you don't need to create a class that implements
ILdapSettings
. The benefit of using the Setting Manager is that it stores the settings in your database. A custom class is for getting it from elsewhere or hardcoding it (useful if you just want to try, but a big no-no in production / git commit).For a start, you can add seed data for your Host in DefaultSettingsCreator with LdapSettingNames: