Keycloak.Net icon indicating copy to clipboard operation
Keycloak.Net copied to clipboard

ResetUserPassword sends not set optional fields

Open deadman2000 opened this issue 3 years ago • 1 comments

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

deadman2000 avatar Apr 22 '21 14:04 deadman2000

I welcome a pull request for this.

lvermeulen avatar May 07 '21 08:05 lvermeulen