ThreeMammals / Ocelot

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

Can Ocelot redirect request to be validated by another API endpoint. #533

Closed shivanka-thunderbolt closed 6 years ago

shivanka-thunderbolt commented 6 years ago

I would like to know if it is possible to redirect the request from Ocelot API gateway to get it validated before forwarding it to downstream. I'm using JWT authentication resource owner flow.

TomPallister commented 6 years ago

@shivanka-thunderbolt yes this is possible. For example, if you register an IdentityServer 4 authentication provider with support for reference tokens only. When Ocelot authenticates the token the request will go out to IdentityServer. All Ocelot does for authentication is delegate to whatever authentication provider has been registered. Please see the docs here for more info.