Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we use Asp.net Identity API in windows/desktop applications as well?

I have a project which has a asp.net mvc based portal which manages user authentication/authorization using Asp.net Identity API.

The project also consists of a windows service/EXE which would poll an MSMSQ queue to get new users information and would save them into the Asp.net Identity Database(used by web project mentioned above).

so my question is - "Can we use Asp.net Identity API in desktop applications too?". The requirement only arises, because user's password hash has to be created, and I am using the default one which is provided by .net framework. So if I am creating a new user into the Asp.net Identity database, then I would need to create the password hash there too.

Any ideas guys?

like image 244
Deepak Pathak Avatar asked Jan 22 '15 07:01

Deepak Pathak


People also ask

How do you add the identity file in an existing ASP.NET Web API core application?

Now, open the Startup configurations and add below code under ConfigureServices. This code will setup the database context. The second line configures the database which should be used for identity. AddIdentity(IServiceCollection) adds the default identity system configuration for the specified User and Role types.

What is ASP.NET identity used for?

ASP.NET Core Identity: Is an API that supports user interface (UI) login functionality. Manages users, passwords, profile data, roles, claims, tokens, email confirmation, and more.


1 Answers

Identity does not take dependency directly on MVC, but it relies on OWIN to set the cookie and authentication. But if you need to check user password against stored hash, manipulate user records, etc. Why not?

You might experience a big pile of dependent packages (ASP.Net) added to your desktop project, but if you don't mind this - there is a possibility you can make it work.

On the other hand, there is Identity Server which can work with MVC project and with Desktop project - without having to add Identity directly into your desktop application - also have a look into that.

like image 136
trailmax Avatar answered Oct 29 '22 16:10

trailmax