hi
Have you logged into your ABP account?
> abp login
What is the output of the abp login-info command?
Thanks
hi
What is your UI page? MVC, Angular, or Blazor?
There is an AcceptLanguageHeaderRequestCultureProvider(accept-language ) by default.
It will use your browser language instead of your default language.
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/localization/select-language-culture?view=aspnetcore-9.0#configure-localization-middleware
Can you check the accept-language value in your browser?
Thanks.
hi
The LdapManager class code at: https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapManager.cs
The OpenLdapManager class code are:
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(OpenLdapManager), typeof(ILdapManager), typeof(LdapManager))]
public class OpenLdapManager : LdapManager
{
public OpenLdapManager(ILdapSettingProvider ldapSettingProvider)
: base(ldapSettingProvider)
{
}
public virtual async Task<string> GetUserEmailAsync(string userName)
{
using (var conn = await CreateLdapConnectionAsync())
{
await AuthenticateLdapConnectionAsync(conn, await NormalizeUserNameAsync(await LdapSettingProvider.GetUserNameAsync()), await LdapSettingProvider.GetPasswordAsync());
var searchResults = await conn.SearchAsync(await GetBaseDnAsync(), await GetUserFilterAsync(userName));
try
{
var userEntry = searchResults.First();
return await GetUserEmailAsync(userEntry);
}
catch (LdapException e)
{
Logger.LogException(e);
}
return null;
}
}
protected async override Task ConnectAsync(ILdapConnection ldapConnection)
{
var schema = await LdapSettingProvider.GetLdapOverSsl() ? Native.LdapSchema.LDAPS : Native.LdapSchema.LDAP;
ldapConnection.Connect(await LdapSettingProvider.GetServerHostAsync(), await LdapSettingProvider.GetServerPortAsync(), schema);
}
protected virtual async Task<string> NormalizeUserNameAsync(string userName)
{
return $"cn={userName},{await LdapSettingProvider.GetBaseDcAsync()}";
}
protected virtual Task<string> GetUserEmailAsync(LdapEntry ldapEntry)
{
return Task.FromResult(ldapEntry.ToDirectoryEntry().GetAttribute("mail")?.GetValue<string>());
}
protected virtual async Task<string> GetBaseDnAsync()
{
return await LdapSettingProvider.GetBaseDcAsync();
}
protected virtual Task<string> GetUserFilterAsync(string userName)
{
return Task.FromResult($"(&(uid={userName}))");
}
}
hi
I basically didn't modify the code, I just set up the testing environment.
https://github.com/spospisil/StructureCloudTest/pull/1/files
hi
Yes. Please check the document https://abp.io/docs/9.1/framework/ui/mvc-razor-pages/customization-user-interface?_redirected=B8ABF606AA1BDF5C629883DF1061649A#overriding-a-razor-page-cshtml
Thanks.
Ok, thanks, I will check your project.
What is your authentication method in Angular?
We need to confirm this first.
Thanks