silentpartnersoftware / Keycloak.Net

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

Flurl 3.* compatibility #6

Closed nerumo closed 1 year ago

nerumo commented 1 year ago

The CreateAndRetrieveUserIdAsync isn't compatible with flurl 3.* versions:

System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<System.Net.Http.HttpResponseMessage> Flurl.Http.GeneratedExtensions.PostJsonAsync(Flurl.Http.IFlurlRequest, System.Object, System.Threading.CancellationToken, System.Net.Http.HttpCompletionOption)'.
   at Keycloak.Net.KeycloakClient.InternalCreateUserAsync(String realm, User user, CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Keycloak.Net.KeycloakClient.InternalCreateUserAsync(String realm, User user, CancellationToken cancellationToken)
   at Keycloak.Net.KeycloakClient.CreateAndRetrieveUserIdAsync(String realm, User user, CancellationToken cancellationToken)

If I downgrade to 2.*, it works

AnderssonPeter commented 1 year ago

I think #7 will fix this issue