lvermeulen / Keycloak.Net

C# client for Keycloak 6.x
MIT License
203 stars 120 forks source link

ResetUserPassword sends not set optional fields #50

Open deadman2000 opened 3 years ago

deadman2000 commented 3 years ago

I trying change password by this:

_client.ResetUserPasswordAsync(_conf.Realm, userId, new Credentials
{
    Value = password,
    Type = "password",
    Temporary = false,
});

Request body is:

{"algorithm":null,"config":null,"counter":null,"createdDate":null,"device":null,"digits":null,"hashIterations":null,"hashSaltedValue":null,"period":null,"salt":null,"temporary":false,"type":"password","value":"123456"}

Throwing exception Flurl.Http.FlurlHttpException: Call failed with status code 400 (Bad Request)

Keycloak answer body:

Unrecognized field "hashSaltedValue" (class org.keycloak.representations.idm.CredentialRepresentation), not marked as ignorable
lvermeulen commented 3 years ago

I welcome a pull request for this.