[keycloak-user] Realm update through REST API

Stian Thorgersen stian at redhat.com
Tue Sep 30 09:45:42 EDT 2014


Added:

  https://github.com/keycloak/keycloak/blob/master/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/RealmTest.java#L50  

----- Original Message -----
> From: "Alexander Chriztopher" <alexander.chriztopher at gmail.com>
> To: "Stian Thorgersen" <stian at redhat.com>
> Cc: keycloak-user at lists.jboss.org
> Sent: Tuesday, 30 September, 2014 2:20:39 PM
> Subject: Re: [keycloak-user] Realm update through REST API
> 
> ok great then.
> 
> i have created an issue here : https://issues.jboss.org/browse/KEYCLOAK-725
> 
> thanks for ur time :-)
> 
> On Tue, Sep 30, 2014 at 1:50 PM, Stian Thorgersen <stian at redhat.com> wrote:
> 
> > Actually, just noticed that updating a realm is missing from the admin
> > client atm :(
> >
> > If you create a jira I'll make sure it's added before the next release
> >
> > ----- Original Message -----
> > > From: "Alexander Chriztopher" <alexander.chriztopher at gmail.com>
> > > To: "Stian Thorgersen" <stian at redhat.com>
> > > Cc: keycloak-user at lists.jboss.org
> > > Sent: Tuesday, 30 September, 2014 1:41:51 PM
> > > Subject: Re: [keycloak-user] Realm update through REST API
> > >
> > > Thanks but that is just the api which i already went through.
> > >
> > > I was looking for a java example such as the ClientAdmin in the examples
> > > actually and that's why I sent the code.
> > >
> > >
> > >
> > > > On 30 Sep 2014, at 12:37, Stian Thorgersen <stian at redhat.com> wrote:
> > > >
> > > >
> > http://docs.jboss.org/keycloak/docs/1.0.1.Final/rest-api/admin/realms/%7Brealm%7D/index.html#PUT
> > > >
> > > > ----- Original Message -----
> > > >> From: "Alexander Chriztopher" <alexander.chriztopher at gmail.com>
> > > >> To: "Stian Thorgersen" <stian at redhat.com>
> > > >> Cc: keycloak-user at lists.jboss.org
> > > >> Sent: Tuesday, 30 September, 2014 12:06:20 PM
> > > >> Subject: Re: [keycloak-user] Realm update through REST API
> > > >>
> > > >> 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
> > > >>
> > >
> >
> 


More information about the keycloak-user mailing list