Hi userlist,
I'm attempting to create a user in java in the way described here, from a java
application and using the keycloak standalone server
http://www.first8.nl/blog/programmatically-adding-users-in-keycloak/
Specifically
CredentialRepresentation credential = new CredentialRepresentation();
credential.setType(CredentialRepresentation.PASSWORD);
credential.setValue("test123");
UserRepresentation user = new UserRepresentation();
user.setUsername("testuser");
user.setFirstName("Test");
user.setLastName("User");
user.setCredentials(Arrays.asList(credential));
kc.realm("master").users().create(user);
The user is created correctly no errors either java side or in the output from the
standalone server and all data seems to be correct however when attempting to login with
the user the credentials are incorrect. I've tried changing the password manually on
the keycloak server and the login is then possible. Am I missing something or is this a
bug?
Thanks,
Will