|
|
Use Scalar to invoke CRUD operations of a Web API |
|
In the previous article we learned to add Swagger and Scalar to a Web API project. I have already explained Swagger integration in more detail here and here. So, it's time to focus on Scalar and learn how to test Web API CRUD operations. |
|
Posted On : 13 Jan 2025 |
|
|
Understand OpenAPI document generation in ASP.NET Core |
|
If you are following the latest happenings in the ASP.NET space then you are probably aware that Swagger UI support has been removed from the default Web API project template. The default project template now simply provides support for generating OpenAPI documents. Of course, you can still use third party tools such as Swagger and Scalar to read the OpenAPI documents. |
|
Posted On : 02 Dec 2024 |
|
|
Use API key authentication in ASP.NET Core |
|
Developers often need to authenticate Web API calls at two levels. You might want to authenticate individual users while making an API call or you might want to authenticate the client that is trying to call an API. The former is can be implemented via a token based scheme and latter can be implemented using what is known an API key authentication. |
|
Posted On : 11 Dec 2023 |
|
|
Create jQuery client that invokes the minimal APIs (CRUD Operations) |
|
In the previous part of this series we started build a JavaScript client that invokes the minimal APIs. So far we have developed the Sign In and Sign Out operations. And now it's time to complete the remaining CRUD operations. Open Index.cshtml file and add the following jQuery code that fills the EmployeeID drop down list for the first time after successfully signing in to the system.
|
|
Posted On : 23 Mar 2022 |
|
|
Create jQuery client that invokes the minimal APIs (Sign In and Sign Out) |
|
In the previous part of this multipart article series we migrated the minimal APIs to API controller in order to understand the efforts involved in the process. So far we have learned various aspects of creating minimal APIs. Now let's learn to create client applications that consume the minimal APIs. |
|
Posted On : 10 Mar 2022 |
|
|
Migrate minimal APIs to controller based APIs |
|
In the previous part of this article series we discussed a few ways of organizing minimal APIs. There can be situations when you would want to migrate your minimal APIs to controller based APIs. In this article we will move our minimal APIs to controller based APIs and see how much work is involved. |
|
Posted On : 19 Jan 2022 |
|
|
Six ways to organize minimal APIs in ASP.NET Core applications |
|
In the previous part of this article series you learned to add minimal APIs to the Startup class. So far we have added minimal APIs to the Program.cs file. If you have only a handful of APIs this won't create any problem. But if you have a lots of minimal APIs to deal with, at some point you will want to organize them in a better way. |
|
Posted On : 05 Jan 2022 |
|
|
Add minimal APIs to the Startup class |
|
In the previous article of this series we discussed integrating ASP.NET Core Identity with JWT and minimal APIs. Minimal APIs are introduced as a part of ASP.NET Core 6.0. All the new project templates in Visual Studio 2022 use the new way of application startup. However, you might be migrating an older project to ASP.NET Core 6.0 and you may want to continue using the Startup class based application initialization. What if you want to create minimal APIs in such cases? Can they be defined in the Startup class? That's what we are going to discuss in this part of this multipart article series. |
|
Posted On : 22 Dec 2021 |
|
|
Integrate ASP.NET Core Identity with JWT and minimal APIs |
|
In the previous part of this multipart article series we implemented JWT authentication in CRUD minimal APIs. Recollect that we are using a hard-coded user name and password while issuing the token in the getToken handler function. Wouldn't it be nice if we integrate ASP.NET Core Identity into app so that membership features such as account creation and user validations are taken care of easily? That's the agenda for this part of the article. |
|
Posted On : 15 Dec 2021 |
|
|
Implement JWT authentication in ASP.NET Core minimal APIs |
|
In the previous part of this article series we learned to integrate Swagger with ASP.NET Core minimal APIs. So far we created minimal APIs for performing CRUD operations. Now it's time to add authentication and authorization to the minimal APIs. As with controller based APIs the most common approach to implement authentication in minimal APIs is to use JSON Web Token or JWT. To that end this part of this series will cover that and will also tweak Swagger configuration to use JWT while invoking the minimal APIs. |
|
Posted On : 10 Dec 2021 |
|
|