NikiforovAll / keycloak-authorization-services-dotnet

Authentication and Authorization with Keycloak and ASP.NET Core 🔐
https://nikiforovall.github.io/keycloak-authorization-services-dotnet/
MIT License
480 stars 113 forks source link

Customize ValidateIssuer #128

Closed johnnyggalt closed 3 months ago

johnnyggalt commented 3 months ago

Hi,

Thanks for this library!

I was wondering why it is not possible to customize the value of ValidateIssuer (it is hard-coded as true). I'm hitting an issue during dev when running Keycloak in Docker, since the Keycloak host name is one thing to other containers in the stack whereas it's localhost from my machine. It would be much easier if I could override this to false during development.

johnnyggalt commented 3 months ago

Nevermind, I figured out I need to customize this via the JwtBearerOptions:

jwtBearerOptions.TokenValidationParameters.ValidateIssuer <- false