Latest Posts On Code Maze

Differences between String and string in C#

Differences between String and string in C#

In this article, we're going to tackle the popular question among many developers, and that's "What's the difference between string and String" and "When should I use string, and when should I use String" in my applications. Both of these versions exist for a reason,...

Blazor Components with Arbitrary and Cascading Parameters

Blazor Components with Arbitrary and Cascading Parameters

Blazor components are reusable parts of the application containing the logic for the user interface creation. So, everything in our application could be a component. A home page, registration, login form, error page, you name it. It's recommended to always use...

Blazor Server vs Blazor WebAssembly, Pros and Cons

Blazor Server vs Blazor WebAssembly, Pros and Cons

In this article, we are going to talk about what is Blazor, we will compare Blazor Server vs Blazor WebAssembly and show some pros and cons. Usually, while developing a web application, we create a server-side project using Java, .NET, Node.js, or some other framework...

Getting Started with ASP.NET Core and MongoDB

Getting Started with ASP.NET Core and MongoDB

In this article, we’re going to cover how to set up an ASP.NET Core Web API with MongoDB as our database. MongoDB is an increasingly popular database and an excellent option for small and large-scale applications. MongoDB is also a convenient database option for...

Multiple Environments in ASP.NET Core

Multiple Environments in ASP.NET Core

In this article, we’re going to cover how to set up and manage multiple environments in ASP.NET Core. If we expect our project to become large and complex, it is a good idea for us to separate our environments. For example, we don’t want to develop software on the...

OWASP Top 10 – Sensitive Data Exposure

OWASP Top 10 – Sensitive Data Exposure

Sensitive data exposure occurs when an application accidentally exposes sensitive data. This differs from a data breach, in which an attacker accesses and steals information. Sensitive data exposure usually occurs when we fail to adequately protect the information in...

Securing Web API with the Hybrid Flow

Securing Web API with the Hybrid Flow

In the second part of this series, we were talking about securing Web API. But, we used the ResourceOwnerPassword and the ClientCredentials flows and Postman as a client. But now, we have our MVC client application, secured with the Hybrid Flow, which requires access...

IdentityServer4 Authorization and Working with Claims

IdentityServer4 Authorization and Working with Claims

We can use claims to show identity-related information in our application but, we can use it for the authorization process as well. In this article, we are going to learn how to modify our claims and add new ones. Additionally, we are going to learn about the...

The Hybrid Flow – Securing ASP.NET Core Web Application

The Hybrid Flow – Securing ASP.NET Core Web Application

In this part of the series, we are going to learn how to secure our web application (a client application) by using the Hybrid flow. We are going to start by introducing our pre-created client application. Then, we are going to learn how to modify the in-memory...

IdentityServer4 UI and Web API Basic Security

IdentityServer4 UI and Web API Basic Security

We have set up our identity server but we lack UI for the users to enter their credentials. We’ve shown how we can retrieve our token but for better user experience, we have to add UI to our Authorization Server. So, adding IdentityServer4 UI is our goal for this...

IdentityServer4 Integration with ASP.NET Core

IdentityServer4 Integration with ASP.NET Core

In this article, we are going to learn about IdentityServer4 Integration with the ASP.NET Core project. We are going to start with some explanations related to JWT, OAuth, OpenIdConnect, and Endpoints, to get familiar with the basics. After the theory part, we are...

C# Design Patterns – Facade

C# Design Patterns – Facade

In this article, we are about to cover another design pattern in C#, this time a structural one. That pattern is the Facade Pattern. The source code is available at the Facade Design Pattern GitHub Repository. For the complete list of articles from this series check...

OWASP Top 10 – Broken Authentication

OWASP Top 10 – Broken Authentication

Broken Authentication is the second most critical vulnerability as per OWASP Top 10 list. Using this vulnerability, an attacker can gain control over user accounts in a system. In the worst case, it could help them gain complete control over the system.  In this...

Two-Step Verification with ASP.NET Core Identity

Two-Step Verification with ASP.NET Core Identity

The two-step verification is a process where a user enters credentials, and after successful password validation,  receives an OTP (one-time-password) via email or SMS. Then, they enter that OTP in the Two-Step Verification form on our site to log in successfully. We...

User Lockout with ASP.NET Core Identity

User Lockout with ASP.NET Core Identity

The user lockout feature is a way to improve application security by locking out a user who enters a password incorrectly several times. This technique can help us in protecting against brute force attacks, where an attacker repeatedly tries to guess a password. In...

Email Confirmation with ASP.NET Core Identity

Email Confirmation with ASP.NET Core Identity

Email Confirmation is quite an important part of the user registration process. It allows us to verify the registered user is indeed an owner of the provided email. But why is this important? Well, let's imagine a scenario where two users with similar email addresses...