Generate secret for user credential through keycloak admin client

Hi, I want to know if it is possible, and eventually how, to generate a secret for a new set of credentials for a user through the java keycloak admin client.

When creating a CredentialRepresentation to associate to a UserRepresentation it is possible to set the type and the value that, as I understand, for type secret is the secret itself.

I am creating a tool to generate a fictitious keycloak server configuration and I want to also be able to create credentials that rely on secrets and not only passwords.

I already looked through various documentation and guides but only found references to Client secrets, and not secrets for credentials, am I missing something or is the secret inherently related to a client?
Can someone guide me in the correct direction?

1 Like