Skip to main content

Posts

Showing posts from December, 2018

Custom - Token Based Authentication in Web API

Authentication  is a vital process in system programming. Authentication means verifying the user who is accessing the system. Today we are using modern devices that have different types of Apps or software and sometimes we directly access the website from browser. To access this application, we probably need to pass our credentials and these systems verify it. If you are valid user then it will allow accessing the system otherwise not. We have available different types of authentication in .Net programming like Windows Authentication, Forms Authentication, Claim Based Authentication, Token Based Authentication etc. Today we will discuss about Token Based Authentication in detail. Token Based Authentication is not very different from other authentication mechanism but yes, it is more secure, more reliable and makes your system loosely coupled. It will be a better choice to create REST API using token-based authentication, if your API reached to broad range of devices like mobiles

Web API - The type namespace name IdentityUser could not be found

There is no needs for - using IdentityUser ; using IdentityDbContext ; Instead you need to add following - using Microsoft . AspNet . Identity . EntityFramework ; Make sure you have that DLL as a reference as shown below. If it is not available, then you can get that nuget from  here . Ref:  https://stackoverflow.com/questions/21642388/the-type-namespace-name-identityuser-could-not-be-found