From the course: Building Angular and ASP.NET Web API Apps

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Setting up AuthController

Setting up AuthController

From the course: Building Angular and ASP.NET Web API Apps

Start my 1-month free trial

Setting up AuthController

- [Narrator] We are going to start implementing the authentication system. If you have previously developed such systems, you might have already heard of the identity framework. But, we're not going to use that framework, because it is too complex for the simple system that we are going to create. So, let us start by creating a new controller. On the controls folder, right click. And then go to add, controller. Choose the web API controller dash empty, and then click the add button. We are going to need this controller, authentication. And then click add. Since we are in here, let us make sure that this controller can be accessed from our (mumbles) application. For that, we need to enable the cors. So, copy this line of code from the address controller, then go to the authentication controller, a basic inline tab. Then import the necessary name space. Now, if you don't want to have the long name authentication your URL, you can always define a new route. So let us define a new route…

Contents