Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch dev with rel-4.4 #9509

Merged
merged 2 commits into from
Jul 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ namespace Volo.Abp.Ldap
public class LdapManager : ILdapManager, ITransientDependency
{
public ILogger<LdapManager> Logger { get; set; }
protected AbpLdapOptions LdapOptions { get; }
protected IOptions<AbpLdapOptions> LdapOptions { get; }

public LdapManager(IOptions<AbpLdapOptions> ldapSettingsOptions)
public LdapManager(IOptions<AbpLdapOptions> ldapOptions)
{
LdapOptions = ldapSettingsOptions.Value;
LdapOptions = ldapOptions;
Logger = NullLogger<LdapManager>.Instance;
}

Expand Down Expand Up @@ -50,11 +50,11 @@ protected virtual Task ConfigureLdapConnectionAsync(ILdapConnection ldapConnecti
return Task.CompletedTask;
}

protected virtual Task ConnectAsync(ILdapConnection ldapConnection)
protected virtual async Task ConnectAsync(ILdapConnection ldapConnection)
{
ldapConnection.Connect(LdapOptions.ServerHost, LdapOptions.ServerPort);
await LdapOptions.SetAsync();

return Task.CompletedTask;
ldapConnection.Connect(LdapOptions.Value.ServerHost, LdapOptions.Value.ServerPort);
}

protected virtual async Task AuthenticateLdapConnectionAsync(ILdapConnection connection, string username, string password)
Expand Down