[keycloak-user] Realm update through REST API

Alexander Chriztopher alexander.chriztopher at gmail.com
Tue Sep 30 06:06:20 EDT 2014


Am actually looking for an example like the AdminClient.

Once you create your post like this :

HttpPost post = *new* HttpPost(KeycloakUriBuilder.*fromUri*(*getBaseUrl*()
+ "/auth").path(ServiceUrlConstants.*REALM_INFO_PATH*).build(*realmName*));

List <NameValuePair> formparams = *new* ArrayList <NameValuePair>();

formparams.add(*new* BasicNameValuePair("username", *username*));

formparams.add(*new* BasicNameValuePair("password", *password*));

formparams.add(*new* BasicNameValuePair(OAuth2Constants.*CLIENT_ID*,
*clientIdOrApplicationName*));

UrlEncodedFormEntity form = *new* UrlEncodedFormEntity(formparams, "UTF-8");

post.setEntity(form);
How do you send your realm representation ?

On Tue, Sep 30, 2014 at 12:00 PM, Stian Thorgersen <stian at redhat.com> wrote:

> If you're doing it from Java the admin client makes this very simple:
>
>
> https://github.com/keycloak/keycloak/blob/master/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/RealmTest.java
>
> otherwise look at the rest docs:
>
>
> http://docs.jboss.org/keycloak/docs/1.0.1.Final/rest-api/overview-index.html
>
> ----- Original Message -----
> > From: "Alexander Chriztopher" <alexander.chriztopher at gmail.com>
> > To: keycloak-user at lists.jboss.org
> > Sent: Tuesday, 30 September, 2014 11:55:59 AM
> > Subject: [keycloak-user] Realm update through REST API
> >
> > Hi guys,
> >
> > Just wondering wether you have an example to do any kind of update on a
> realm
> > through REST.
> >
> > Many thanks for any help.
> >
> > Regards.
> >
> > _______________________________________________
> > keycloak-user mailing list
> > keycloak-user at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/keycloak-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20140930/44c85217/attachment-0001.html 


More information about the keycloak-user mailing list