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

Aspire Support #101

Closed NikiforovAll closed 5 months ago

NikiforovAll commented 6 months ago

Proposal

Add first-class support for Aspire.

var builder = DistributedApplication.CreateBuilder(args);

builder.AddKeyCloakContainer().WithAuthServices(realm: "MyAwesomeRealm");

builder.Build().Run();

Questions

Q: There are different types of options that we need to configure. Some of them are opt-in. We could inject auth-server-url environment variable and use it as a fallback option. Q: Should we depend on AddKeycloakContainer or provide our own Aspire Resouce (fork?) to be more independent?

ref: https://github.com/dotnet/aspire/issues/1326 ref: https://github.com/davidfowl/AspireSwaggerUI

NikiforovAll commented 5 months ago

see https://www.nuget.org/packages/Keycloak.AuthServices.Aspire.Hosting