Hi,
I'm creating users programmatically from my java code,but
the users credential and roles are note "persisted" (I think),
when the user try to authenticate he get Invalid username
or password (even if he is visible in the admin
console), If I define (from the admin console) a passe Word
for the user and use it he can access his account, but here
come the 2 problem, even if I give him the right (role) to use
a resource he gets forbidden.
here is the code that I use to define users credential and
role :
CredentialRepresentation credential = new
CredentialRepresentation();
credential.setType(CredentialRepresentation.PASSWORD);
credential.setValue("123");
user.setCredentials(Arrays.asList(credential));
user.setRealmRoles(Arrays.asList("guest"));
Cordially