简体   繁体   中英

Login in a WinForm app using Asp.Net Identity through an API

I have a website, using ASP.NET Identity for login. Now I need to log in a WinForm application (with a registered user), using Identity from website, sending username and password through an API to Identity.

User data is going to be received by the website through an API made by me, but then I don't know how to use this data to authenticate with Identity. I tried to instantiate LoginModel class from Identity, but it said "it is not intended to be used directly from your code".

I would appreciate if you can give me some suggestions.

Thanks.

I found the solution. I used SignInManager to log in with credentials taken from API.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM