I need to know how to change the authentication provider (users store) from SQL Server to custom Web Service, i tried to follow the code and reached to the method GetLoginResultAsync under TokenAuthController which calls _logInManager.LoginAsync which leads to AbpLogInManager class , however couldn't follow to AbpLogInManager class as it's referenced as DLL only.
can you please provide bullet points to change the authentication provider ? including get current session method which checks the user in the SQL database as well.
Best, Ahmed
6 Answer(s)
-
0
Hi Ahmed,
The DLL source codes can be found at GitHub. It's either part of aspboilerplate or module-zero.
Good luck.
Regards, /tommy
-
0
Hi,
Thanks @tteoh for your answer. Yes, AbpLoginManager is in Abp.Zero package. You can check it here <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero/blob/master/src/Abp.Zero/Authorization/AbpLoginManager.cs">https://github.com/aspnetboilerplate/mo ... Manager.cs</a>.
In AspNetZero, there is a class named LogInManager which derives from AbpLoginManager. You can override any method in it includin LoginAsync.
Thanks.
-
0
Thank you very much, Now if i change this method to login via web service, What about GetCurrentSession ? is it in the same DLL ? and is there a way to implement it the same way as the active directory authentication ?
-
0
Hi,
When you mentioned that i realized you can also use an external auth explained in here <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Zero/User-Management#external-authentication">https://aspnetboilerplate.com/Pages/Doc ... entication</a>.
Why didn't you choose that way ?
-
0
this is exactly what i was looking for, Thank you.
one last question, what about get current user session, i don't remember the exact name but i remember there is something like that to check the current user session
in other words will the external authentication work fine if the users store is totally external and no users saved in the SQL DB ?
-
0
Hi,
I think you will need a user record in local SQL anyway. For example, LDAP auth creates and updates user info when a user logs in with LDAP. In some places of AspNet Zero, we query AbpUsers table directly with a repository.
So, you can follow a similar approach like LDAP auth.