Hi,
Can anyone give me some more detailed explanation about this matter: external-authentication In concrete, the example they gave... I dont understand and I dont know where to find it.
I need it to use in my application.
Thanks in advance.
8 Answer(s)
-
0
Hi @logicpulse,
Could you explain how would you liek to use it ?
-
0
Hi,
Sure. I have another application that it's working with a login... and I need that users login match with my current application developed in ASP.NET Core/Angular logins. In other words, I have a table named "Users" with different logins from that old application (and I think I need to create it in my application .NET Core/Angular) and I have the table "AbpUsers" in the application .NET Core/Angular... the logins must match, so that I can login/register users from the old application in the new one.
Please tell me if you understand what I'm trying to say.
Thanks.
-
0
hi @logicpulse
This
DefaultExternalAuthenticationSource
source code. https://github.com/aspnetboilerplate/aspnetboilerplate/blob/e0ded5d8702f389aa1f5947d3446f16aec845287/src/Abp.Zero.Common/Authorization/Users/DefaultExternalAuthenticationSource.cs#L12You can read the
Users
table of another application in theTryAuthenticateAsync
method to verify the user password and returntrue
orfalse
.Of course, you can also call the remote api in the method to authenticate the user.
If the method returns
true
.AbpLoginManager
will create the user. You can check the source code to understand how it works.https://github.com/aspnetboilerplate/aspnetboilerplate/blob/c0604b9b1347a3b9581bf97b4cae22db5b6bab1b/src/Abp.ZeroCore/Authorization/AbpLoginManager.cs#L324
-
0
Hello all,
Thanks for the help. I'm sorry to bother you again... but where do I put that files like DefaultExternalAuthenticationSource and IExternalAuthenticationSource.cs in my application? I mean, in what module (or folder) do I put it?
Here goes a screenshot... of the places that can be put in. In logicpulseDemo.Application or logicpulseDemo.Application.Shared or another one?
-
0
hi
Since it is authentication, it should appear in
Web.Core
-
0
Hello,
Thanks. Now I have just one more problem. You (maliming) said this "You can read the Users table of another application in the TryAuthenticateAsync method to verify the user password and return true or false." My problem is, how can I read the Users table of another application? I mean, how can I read a table (instead of create it) from another Database? Can you give me some example please?
-
0
how can I read a table from another Database?
You can use EF Core or Dapper or ado.net to connect to the database and read the contents of the table.
-
1
Problem solved. Thank you for all the support.