ThreeMammals / Ocelot

.NET API Gateway
https://www.nuget.org/packages/Ocelot
MIT License
8.38k stars 1.64k forks source link

How can i design my own Authentication logic #723

Closed KantJoe closed 5 years ago

KantJoe commented 5 years ago

Expected Behavior / New Feature

eventhought,i design my own authentication module and i prepare to use ocelot for our compay apidns gateway,but now for our company products are use custom way to do authentication logic,i hope u can help me to doing this.btw i found "JwtBearerEvents" this class on code,and can i use this for my code instead urs?

i mean i'd design couples module of authentication like jwt but details.so i wanna know if there has anyway to do custom authentication procedure ?

Actual Behavior / Motivation for New Feature

Ocelot.JwtAuthorize.

Steps to Reproduce the Problem

1.this is a suggest no problem 1. 1.

Specifications

philproctor commented 5 years ago

Authentication is handled by ASP.NET, so you can easily customize your own authentication modules by setting up the modules there.

See here: https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-2.2&tabs=visual-studio

The only thing you need to do to integrate is make sure the UseAuthentication() and similar modules are added before Ocelot.