Ldap library for .Net
Install-Package NetApp.Security.Windows (Contains additional functions targeting windows platform)
or
Install-Package NetApp.Security
- Call the followings in Startup:
services.AddEncryptionService(options => {
options.Key=Configuration.GetValue<string>("Encryption:Key");
options.Iv = Configuration.GetValue<string>("Encryption:Iv");
});
services.AddLdapService(options => {
Configuration.GetSection("Ldap").Bind(options);
});
- appsettings.json:
//AES Key and Iv
"Encryption": {
"Key": "xxxx",
"Iv": "xx"
},
"Ldap": {
"ServerName": "xxx",
"ServerPort": 636,
"UseSSL": true,
"Credentials": {
"DomainUserName": "xxx@local",
"Password": "xxx"
},
"SearchBase": "DC=xx,DC=xxx",
"ContainerName": "DC=xx,DC=xxx",
"DomainName": "xx.xxx",
"DomainDistinguishedName": "DC=xx,DC=xxx"
}
All source code is licensed under MIT license - http://www.opensource.org/licenses/mit-license.php