silentpartnersoftware / Keycloak.Net

C# client for Keycloak version 17+
MIT License
51 stars 31 forks source link

Keycloak v 17+ update and bug fix #5

Closed gterdem closed 2 years ago

gterdem commented 2 years ago

Update to Keycloak 17+ fixes https://github.com/AnderssonPeter/Keycloak.Net/issues/2 fixes https://github.com/lvermeulen/Keycloak.Net/issues/71

Tested in keycloak 19.0.2

gterdem commented 2 years ago

@AnderssonPeter Can you publish a new NuGet version when you merge it, please?

AnderssonPeter commented 2 years ago

I see that you have modified the auth url, will this break compatibility with older versions of keycloak?

And Keycloak.Net.Models.ProtocolMappers.Config is not not used so could you remove that class?

gterdem commented 2 years ago

I see that you have modified the auth url, will this break compatibility with older versions of keycloak?

And Keycloak.Net.Models.ProtocolMappers.Config is not not used so could you remove that class?

I have added KeycloakOptions for configuring the prefix and the default adminClientId.

It will be a breaking change for older versions since /auth prefix is no longer used and it's default value is "". To use it with older versions, KeycloakClient should be instantiated as:

new KeycloakClient(
          "http://keycloak.url",
          "adminUserName",
          "adminPassword",
          new KeycloakOptions("auth")
      );
AnderssonPeter commented 2 years ago

New nuget has been uploaded