We need to add a better REST api for user registration. I'll add that
to beta 3 or beta 4 as a JIRA.
BUT....
We can't you use the Keycloak registration page? It is completely
configurable to have the same look and feel as your application.
On 6/10/2014 2:26 AM, Conrad Winchester wrote:
Hi again,
a requirement of the application I am working on is for one person to
very easily be able to add another using their email address.
We must not use the keycloak realm registration page and so I was
wondering what the best way to proxy a realm user registration is?
I am trying to use the rest api like this
----
HttpPost post = new HttpPost(
KeycloakUriBuilder
.fromUri("http://localhost:8080/auth")
.path("/realms/shift/tokens/registrations")
.queryParam("client_id","security-admin-console")
.build());
List<NameValuePair> formparams = new ArrayList<>();
formparams.add(new BasicNameValuePair("username",
user.getEmail()));
formparams.add(new BasicNameValuePair("password",
user.getPassword()));
formparams.add(new BasicNameValuePair("email",user.getEmail()));
UrlEncodedFormEntity form = new
UrlEncodedFormEntity(formparams, "UTF-8");
post.setEntity(form);
HttpResponse response = client.execute(post);
——
But I am not sure what the returned entity is, nor how to get the ID of
the newly registered user.
Is there another way to do this?
Any help would be greatly appreciated
Thanks
Conrad
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com