Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "klainer"

Hello, I created sample project with my problem and solution of it. Project is based on: ABP + ZERO + OWIN Mixed Auth: <a class="postlink" href="https://mega.nz/#!DUMgAD7A!tCX0MeHbYA88WGfj4clgcBE97HixrtaqPaH9N51d8f4">https://mega.nz/#!DUMgAD7A!tCX0MeHbYA88 ... aH9N51d8f4</a>

Please somebody have little time and test my SAMPLE auto windows login project, I will be pleased. I have problem with redirection loop when signin / sign out.

Thanks hikalkan !

SOLVED by await before every async CALL :D :) I got DEDLOCK,more info: <a class="postlink" href="http://blog.stephencleary.com/2012/07/dont-block-on-async-code.html">http://blog.stephencleary.com/2012/07/d ... -code.html</a>

OK SOLVED :)

I created my custom config and enable correctly, LDAP support . Works perfect !! Thank you!

Ok tahnks works. I´m aldo traing LDAP auth:

In my core module in PreInitialize method I call this:

IocManager.Register<ILdapSettings, MNDLdapSettings>(); //change default setting source
Configuration.Modules.ZeroLdap().Enable(typeof(MyLdapAuthenticationSource));

I have also class:

public class MyLdapAuthenticationSource : LdapAuthenticationSource<Tenant, User>
    {
        public MyLdapAuthenticationSource(ILdapSettings settings, IAbpZeroLdapModuleConfig ldapModuleConfig)
            : base(settings, ldapModuleConfig)
        {
        }
    }

Then i Created this settings class:

public class MNDLdapSettings : ILdapSettings
    {
        public async Task<bool> GetIsEnabled(int? tenantId)
        {
            return true;
        }

        public async Task<ContextType> GetContextType(int? tenantId)
        {
            return ContextType.Domain;
        }

        public async Task<string> GetContainer(int? tenantId)
        {
            return "";
        }

        public async Task<string> GetDomain(int? tenantId)
        {
            return "domain";
        }

        public async Task<string> GetUserName(int? tenantId)
        {
            return "name";
        }

        public async Task<string> GetPassword(int? tenantId)
        {
            return "pass";
        }
    }

I also tried use your default setting like you noted:

Note: If you don't define domain, username and password, LDAP authentication works for current domain if your application runs in a domain with appropriate privileges.

And try enable LDAP like in this post / last unanswered question: #205@a9e9ccf7-5841-4126-9423-c0d5b678eb9b

But no work , the same problem with : Abp.AbpException: There is no setting defined with name: Abp.Zero.Ldap.IsEnabled

When is LDAP enablet and in cotroller is [AbdAuthorized] attribute. User will be logged automaticly ?

Please help ... Thnaks!

But auth no work for me, how can I detect error in credectials etc or debug auth using LDAP ? Thnaks

Ok I used your basic sample, with simply retun true. I registered this MyExternalAuthSource, in Web project.

public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());

            AreaRegistration.RegisterAllAreas();
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
    }

    public class MyExternalAuthSource : DefaultExternalAuthenticationSource<Tenant, User>
    {
        public override string Name
        {
            get { return "MyCustomSource"; }
        }

         

        public override async Task<bool> TryAuthenticateAsync(string userNameOrEmailAddress, string plainPassword, Tenant tenant)
        {
            //TODO: authenticate user and return true or false
            return true;
        }
    }

But i dont know what i must tu do next for login person by using this external source. In documentation this is missing and I´m confused . What i must change in Login method in auth controller ?

I algo got this error:

No component for supporting the service TT.MyExternalAuthSource was found

Popis: Při provádění aktuálního webového požadavku došlo k neošetřené výjimce. Další informace o chybě a o jejím původu v kódu naleznete v trasování zásobníku. 

Podrobnosti o výjimce: Castle.MicroKernel.ComponentNotFoundException: No component for supporting the service TT.MyExternalAuthSource was found

Ok I solved this by add this code to intialization of Core Module:

public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
            IocManager.Register<MyExternalAuthSource>(DependencyLifeStyle.Transient);
        }

Mayby another question. I notice that when use Custom auth login, AbpUser table automaticly create new record for logged person name and also generate password. Is this appropoach good for my situation ( I have onother table with users) so roles and other stuff are still depended on AbpUser ?

Thnaks for any tip!

Thanks for reply! Let´s assume that I need to use different table than AbpUser for login check, how would you preoceed ? For login to apllication is windows username needed, if username is in DB , then user is logged. Thats all..

By the way Views is possible to map...

Thanks !

Works, thanks !!

I checked this document, tried this:

Configuration.Localization.Sources.Extensions.Add(
                new LocalizationSourceExtensionInfo("AbpWeb",
                    new XmlFileLocalizationDictionaryProvider(
                        HttpContext.Current.Server.MapPath("~/Localization/AbpWebExtensions")
                        )
                    )
                );

And overide the names in resource file, but it dont work.

Thnaks for tips!

Showing 11 to 18 of 18 entries