I didn't receive anything on my email yet (already checked spam etc..). can you make sure that its sent please? I sent you an email reply to it with the project please
hi saudalshammari2030@gmail.com
its a fresh project can you just implement it and share it with me please
can I send you my code ? provide me your email please
I want automatic login is that possible or do I must press windows button and then register by email ?
I am building file storage application to be consumed a cross my other apps and I am storing files on server as blobs , so having many files will lead to performance problems if I didn't use Azure blob or Minio ?
if I have like 100k+ files in the same Basepath folder will I face any performance issue ? or ABP can handle it
all classes are on FinalizedApp.HttpApi.Host
------------------------------------------
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Options;
using System.Threading.Tasks;
using Volo.Abp.Features;
using Volo.Abp.Guids;
using Volo.Abp.Identity.ExternalLoginProviders.Ldap;
using Volo.Abp.Identity;
using Volo.Abp.Ldap;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Settings;
namespace FinalizedApp
{
public class VoloLdapExternalLoginProvider : LdapExternalLoginProvider
{
public VoloLdapExternalLoginProvider(
IGuidGenerator guidGenerator,
ICurrentTenant currentTenant,
IdentityUserManager userManager,
IIdentityUserRepository identityUserRepository,
OpenLdapManager ldapManager,
ILdapSettingProvider ldapSettingProvider,
IFeatureChecker featureChecker,
ISettingProvider settingProvider,
IOptions<IdentityOptions> identityOptions)
: base(guidGenerator,
currentTenant,
userManager,
identityUserRepository,
ldapManager,
ldapSettingProvider,
featureChecker,
settingProvider,
identityOptions)
{
}
protected override async Task<string> NormalizeUserNameAsync(string userName)
{
// Default is $"uid={userName}, {BaseDc}"
// or "userName@domain
//await LdapSettingProvider.GetDomainAsync();
var loginUserName = await Task.FromResult($"{userName}");
return loginUserName;
}
}
}
--------------------------------------
using LdapForNet;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Identity.ExternalLoginProviders.Ldap;
using Volo.Abp.Ldap;
namespace FinalizedApp
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(OpenLdapManager), typeof(ILdapManager), typeof(LdapManager))]
public class VoloOpenLdapManager : OpenLdapManager
{
public VoloOpenLdapManager(ILdapSettingProvider ldapSettingProvider)
: base(ldapSettingProvider)
{
}
protected override async Task<string> NormalizeUserNameAsync(string userName)
{
// or "userName@domain
//await LdapSettingProvider.GetDomainAsync();
return await Task.FromResult($"{userName}");
}
protected override Task<string> GetUserFilterAsync(string userName)
{
// Default is $"cn={userName},{LdapOptions.BaseDc}"
return Task.FromResult($"(&(objectClass=user)(sAMAccountName={userName}))");
}
protected override Task<string> GetUserEmailAsync(LdapEntry ldapEntry)
{
return Task.FromResult(ldapEntry.ToDirectoryEntry().GetAttribute("mail")?.GetValue<string>());
}
}
}
--------------------------------------------------
Configure<AbpIdentityOptions>(options =>
{
options.ExternalLoginProviders.Remove(LdapExternalLoginProvider.Name);
options.ExternalLoginProviders.Add<VoloLdapExternalLoginProvider>(LdapExternalLoginProvider.Name);
});
}
---------------------------------
I got same Exception