fschmtt / keycloak-rest-api-client-php

PHP client to interact with Keycloak's Admin REST API.
MIT License
26 stars 18 forks source link

`hashedSaltedValue` missing from `Credential` representation #109

Closed elnurvl closed 2 months ago

elnurvl commented 5 months ago

It is not straightforward to create a credential representation out of an existing bcrypt hash value due to the lack of hashedSaltedValue.

A user would need to decompose the hash manually before making a Credential representation.

fschmtt commented 5 months ago

Hey, I'm out for the next 5 days, so please don't wonder when I'm not responding 😅

fschmtt commented 5 months ago

Would it be sufficient to just add the missing property to the representation class?

I tried it locally, but I cannot generate a client with credentials that has the hashedSaltedValue available.

Additionally, the property is deprecated: https://www.keycloak.org/docs-api/25.0.0/javadocs/org/keycloak/representations/idm/CredentialRepresentation.html#hashedSaltedValue

What would you suggest to solve your issue? 🤔

prajwaldivate commented 2 months ago

Hey @fschmtt

I am looking forward to use this fix in my project. I noticed that the commit is currently on the credential-properties branch. Are there any plans to merge this into the main branch soon?

Thanks!

fschmtt commented 2 months ago

Hey @prajwaldivate if you could, please verify that https://github.com/fschmtt/keycloak-rest-api-client-php/pull/120 works for you, then I'll happily merge it 🙂