Starts in:
2 DAYS
4 HRS
38 MIN
52 SEC
Starts in:
2 D
4 H
38 M
52 S

Activities of "vijay.nallala"

Thank you for pointing that out. We are dealing with tables that have hundreds of columns. Is there anyway, we can automate that process?

Please refer same issue - https://github.com/abpframework/abp/issues/12320

all protected virtual must be public so that we can override which methods/props. it doesn't make sense making as protected

@maimling - why it closed I am asking the override functionality your referring the extension. please advise

added more info

to more clear see bloew we need to override auth and localization props. please suggest

Answer

For --admin/host auth below bindasync await ldapConnection.BindAsync(LdapAuthType.Negotiate, new LdapCredential { // Configure username according to your LDAP config: // cn=admin,dc=abp,dc=com or just username. UserName = adminUserName, Password = adminPassword, AuthorizationId = baseDc,
});

For - user auth below bindasync await ldapConnection.BindAsync(LdapAuthType.Simple, new LdapCredential { UserName = userEntry.Dn, Password = testPassword, });

i would need two method in abp??

Answer

as sample below bind =BindAsync working cn.Bind(LdapAuthType.Digest, new LdapCredential { UserName = "username", Password = "clearTextPassword", AuthorizationId = "u:admin" });

how can i override from abp?

--- admin auth vs were abp override method?? await ldapConnection.BindAsync(LdapAuthType.Negotiate, new LdapCredential { // Configure username according to your LDAP config: // cn=admin,dc=abp,dc=com or just username. UserName = adminUserName, Password = adminPassword, AuthorizationId = baseDc,
});

--- user auth as below sample abp override method??

var searchResults = await ldapConnection.SearchAsync(baseDc, $"(&(objectClass=user)(cn={testUserName}))");

                //var searchResults = await ldapConnection.SearchAsync(baseDc, $"(&(uid={testUserName}))");
                Console.WriteLine();
                Console.WriteLine($"{testUserName} attributes:");
                
                var userEntry = searchResults.First();
                Console.WriteLine(string.Join(", ", userEntry.ToDirectoryEntry().Attributes));

                await ldapConnection.BindAsync(Native.LdapAuthType.Simple, new LdapCredential
                {
                    UserName = userEntry.Dn,
                    Password = testPassword
                });

here abp - not sure which one has user auth and admin auth call.. after that it make the entry in user table

public class LdapManager : ILdapManager, ITransientDependency { public ILogger<LdapManager> Logger { get; set; } protected ILdapSettingProvider LdapSettingProvider { get; }

public LdapManager(ILdapSettingProvider ldapSettingProvider)
{
    LdapSettingProvider = ldapSettingProvider;
    Logger = NullLogger&lt;LdapManager&gt;.Instance;
}

public virtual async Task&lt;bool&gt; AuthenticateAsync(string username, string password)
{
    try
    {
        using (var conn = await CreateLdapConnectionAsync())
        {
            await AuthenticateLdapConnectionAsync(conn, username, password);
            return true;
        }
    }
    catch (Exception ex)
    {
        Logger.LogException(ex);
        return false;
    }
}

protected virtual async Task&lt;ILdapConnection&gt; CreateLdapConnectionAsync()
{
    var ldapConnection = new LdapConnection();
    await ConfigureLdapConnectionAsync(ldapConnection);
    await ConnectAsync(ldapConnection);
    return ldapConnection;
}

protected virtual Task ConfigureLdapConnectionAsync(ILdapConnection ldapConnection)
{
    return Task.CompletedTask;
}

protected virtual async Task ConnectAsync(ILdapConnection ldapConnection)
{
    ldapConnection.Connect(await LdapSettingProvider.GetServerHostAsync(), await LdapSettingProvider.GetServerPortAsync());
}

protected virtual async Task AuthenticateLdapConnectionAsync(ILdapConnection connection, string username, string password)
{
    await connection.BindAsync(Native.LdapAuthType.Simple, new LdapCredential()
    {
        UserName = username,
        Password = password
    });
}

}

Answer

Hi maliming,

As you see code/error getting from sample application(https://github.com/abpframework/abp-samples/tree/master/AbpLdapSample). we followed same document to enable the ldap. now we are getting same issue as (https://support.abp.io/QA/Questions/754/How-To-use--LDAP-authentication) for that and this issue looking for answer.

I am not able see below folder . Can you please send what ever it was done from your end? also we are facing same issue on proxy as well. i guess it same lib causing both issues

angular.suite\schematics

Showing 1 to 10 of 36 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06