lvermeulen / Keycloak.Net

C# client for Keycloak 6.x
MIT License
201 stars 118 forks source link

/auth prefix was removed in keycloak v17.0.1 #75

Open liorpid opened 2 years ago

liorpid commented 2 years ago

Hi,

is it possible to remove the /auth prefix from the base url?

psavva commented 1 year ago

I'm upgrading to Keycloak 18 as well.

Change needed here: https://github.com/lvermeulen/Keycloak.Net/blob/5870da22392273b1a6171769115ec7061a4b809a/src/Keycloak.Net/KeycloakClient.cs#L55

We could implement a conditional statement that will append or not append the "/auth" with a default value to append as not to break any current implementations when they upgrade.

For new implementations we can set a flag like appendAuthPath to true/false that will append the auth part or not..

@lvermeulen you ok with this, I'll have a PR out to you on Monday if you agree.

psavva commented 1 year ago

Removal of the /auth is done via this PR, Also upgrading .net libraries, removed support for .net classic Please see Pull Request https://github.com/lvermeulen/Keycloak.Net/pull/79

mferuglio commented 1 year ago

Hi, For information, you can use KC_HTTP_RELATIVE_PATH = "/auth" (or cli cmd : --http-relative-path) to avoid this modification. https://www.keycloak.org/server/all-config?q=http-relative-path

Best regards.

psavva commented 1 year ago

Hi, For information, you can use KC_HTTP_RELATIVE_PATH = "/auth" (or cli cmd : --http-relative-path) to avoid this modification. https://www.keycloak.org/server/all-config?q=http-relative-path

Best regards.

This has now been made configurable

Please see: https://github.com/lvermeulen/Keycloak.Net/pull/79/commits/fde9afa762fafc84a336a51d6ab93be8fb8dc684