m-jovanovic / yarp-authentication

An example project demonstrating how to implement an API Gateway with authentication using YARP.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YARP Authentication

There are a few sample requests you can send from the gateway.http file. The gateway is configured to use token authentication, so you can easily test this.

@BaseUrl =
@AccessToken =

### Login - pass `isVip=true` to add the respective claim

GET {{BaseUrl}}/login?isVip=true

### Proxy api/hello

GET {{BaseUrl}}/api/hello
Authorization: Bearer {{AccessToken}}

### Proxy api/hello-vip

GET {{BaseUrl}}/api/hello-vip
Authorization: Bearer {{AccessToken}}

Whenever you're ready, there are 2 ways I can help you::

  1. Pragmatic Clean Architecture: Join 2,900+ students in this comprehensive course that will teach you the system I use to ship production-ready applications using Clean Architecture. Learn how to apply the best practices of modern software architecture.

  2. Modular Monolith Architecture: Join 750+ engineers in this in-depth course that will transform the way you build modern systems. You will learn the best practices for applying the Modular Monolith architecture in a real-world scenario.

About

An example project demonstrating how to implement an API Gateway with authentication using YARP.


Languages

Language:C# 50.4%Language:Dockerfile 49.6%