Securing APIs is a critical part of modern application development. Instead of reinventing authentication and authorization, we can rely on industry standards such as OAuth 2.0 and OpenID Connect.
𝗜𝗱𝗲𝗻𝘁𝗶𝘁𝘆 𝗦𝗲𝗿𝘃𝗲𝗿 is a system that manages user login, authentication, and secure access to applications. It helps apps know who the user is and what they are allowed to do, without each app handling logins separately.
𝗗𝘂𝗲𝗻𝗱𝗲 𝗜𝗱𝗲𝗻𝘁𝗶𝘁𝘆𝗦𝗲𝗿𝘃𝗲𝗿 is a highly extensible and standards-compliant framework for .NET Core that helps you issue tokens, handle authentication, and enforce authorization for your APIs and applications.
In this article , we used the 𝗰𝗹𝗶𝗲𝗻𝘁 𝗰𝗿𝗲𝗱𝗲𝗻𝘁𝗶𝗮𝗹𝘀 flow, which works well for 𝗺𝗮𝗰𝗵𝗶𝗻𝗲-𝘁𝗼-𝗺𝗮𝗰𝗵𝗶𝗻𝗲 communication. But in real applications with human users, we need an interactive login experience.
𝗜𝗻 𝘁𝗵𝗲 𝗻𝗲𝘅𝘁 𝗴𝘂𝗶𝗱𝗲, we will discover how to build a 𝗹𝗼𝗴𝗶𝗻 𝗨𝗜 and 𝗶𝗻𝘁𝗲𝗴𝗿𝗮𝘁𝗲 redirection to 𝗜𝗱𝗲𝗻𝘁𝗶𝘁𝘆𝗦𝗲𝗿𝘃𝗲𝗿 for scenarios such as .NET Core 𝗠𝗩𝗖 applications, 𝗦𝗶𝗻𝗴𝗹𝗲 𝗣𝗮𝗴𝗲 𝗔𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻𝘀 (SPAs) like Angular or React, and even native 𝗺𝗼𝗯𝗶𝗹𝗲 or 𝗱𝗲𝘀𝗸𝘁𝗼𝗽 apps.
A cheat sheet for the .NET Command-Line Interface (CLI) provides a quick reference to common commands used for developing, building, running, and publishing .NET applications.
YARP (Yet Another Reverse Proxy) is a highly customizable reverse proxy library for .NET. It's designed to provide a robust, flexible, scalable, secure, and easy to use proxy framework. YARP helps developers create powerful and efficient reverse proxy solutions tailored to their specific needs.
You’ve probably heard the names of architectures like DDD, CQRS, or Microservice many times at work, in interviews, and so on. They’ve basically become the trend these days.
But are these architectures really that good?
Does the three-layer architecture still have a place in the area of clean code, or is it just too basic and trivial?
HybridCache in .NET is a caching mechanism introduced in .NET 9 that combines the benefits of both in-memory caching and distributed caching.It aims to provide a unified and efficient caching solution forASP.NETCore applications and other .NET projects.
Pattern matching is a technique where you test an expression to determine if it has certain characteristics.
C# pattern matching provides more concise syntax for testing expressions and taking action when an expression matches.
The "is" supports pattern matching to test an expression and conditionally declare a new variable to the result of that expression.
The "switch" enables you to perform actions based on the first matching pattern for an expression.
These two expressions support a rich vocabulary of patterns.
Response compression reduces the size of data sent from your API to clients, resulting in faster load times and lower bandwidth usage. By compressing responses, you improve overall application performance and create a better experience for users, especially over slower networks.
The Microsoft.AspNetCore.RateLimiting middleware provides rate limiting middleware. Apps configure rate limiting policies and then attach the policies to endpoints.
Why use rate limiting
Rate limiting can be used for managing the flow of incoming requests to an app. Key reasons to implement rate limiting:
Memcached is a distributed, high-speed caching system that stores simple key-value pairs in memory. It’s ideal for quick, transient data storage without persistence or complex features.
Redis is a distributed, open-source, in-memory data store used as a cache, database, and message broker. It supports advanced data structures and features like persistence, replication, and clustering.
Yes, you can configure IDistributedCache in .NET to use either Redis or Memcached as the backend cache provider. This allows you to use the distributed caching infrastructure of .NET while leveraging the power of Redis or Memcached to store the data.
© vahid arya. All Rights Reserved.