[keycloak-user] Java Keycloak REST API Wrapper

Stian Thorgersen stian at redhat.com
Wed Jul 16 09:34:44 EDT 2014


Bill: does it make sense for us to share interfaces (with jax-rs annotations) for services and admin-client?

----- Original Message -----
> From: "Rodrigo Sasaki" <rodrigopsasaki at gmail.com>
> To: "Stian Thorgersen" <stian at redhat.com>
> Cc: "Juraci Paixão Kröhling" <juraci at kroehling.de>, keycloak-user at lists.jboss.org
> Sent: Wednesday, 16 July, 2014 2:31:35 PM
> Subject: Re: [keycloak-user] Java Keycloak REST API Wrapper
> 
> I'll get on it for sure.
> 
> Just one thing, should I create myself the interfaces for the services? Or
> is there a more integrated way to do that?
> 
> 
> On Wed, Jul 16, 2014 at 10:27 AM, Stian Thorgersen <stian at redhat.com> wrote:
> 
> > Great work with the admin-client. As I commented on GitHub I added it to
> > 'admin-client' branch, and would like a few changes before merging to
> > master:
> >
> > * Make it use RestEasy client framwork
> > * Tests - I've added a starting point to
> > https://github.com/keycloak/keycloak/blob/admin-client/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/AdminClientTest.java
> > * Better error handling - instead of swallowing exceptions it now throws
> > KeycloakException (RuntimeException), but there's HTTP response codes are
> > not checked (see above test that tries to create two users with the same
> > username)
> >
> > If you're happy to do this work that would be awesome!
> >
> > ----- Original Message -----
> > > From: "Rodrigo Sasaki" <rodrigopsasaki at gmail.com>
> > > To: "Stian Thorgersen" <stian at redhat.com>
> > > Cc: "Juraci Paixão Kröhling" <juraci at kroehling.de>,
> > keycloak-user at lists.jboss.org
> > > Sent: Monday, 14 July, 2014 2:44:48 PM
> > > Subject: Re: [keycloak-user] Java Keycloak REST API Wrapper
> > >
> > > Glad to hear it :)
> > >
> > > I'll be waiting on more replies and ideas to perhaps make it better.
> > > Thanks! :)
> > >
> > >
> > > On Mon, Jul 14, 2014 at 10:43 AM, Stian Thorgersen <stian at redhat.com>
> > wrote:
> > >
> > > > Great stuff, I'll have a look at it soon. At first glance it looks
> > really
> > > > good!
> > > >
> > > > Thanks :)
> > > >
> > > > ----- Original Message -----
> > > > > From: "Rodrigo Sasaki" <rodrigopsasaki at gmail.com>
> > > > > To: "Stian Thorgersen" <stian at redhat.com>
> > > > > Cc: "Juraci Paixão Kröhling" <juraci at kroehling.de>,
> > > > keycloak-user at lists.jboss.org
> > > > > Sent: Monday, 14 July, 2014 2:40:17 PM
> > > > > Subject: Re: [keycloak-user] Java Keycloak REST API Wrapper
> > > > >
> > > > > PR submitted :)
> > > > >
> > > > >
> > > > > On Fri, Jul 11, 2014 at 9:56 AM, Stian Thorgersen <stian at redhat.com>
> > > > wrote:
> > > > >
> > > > > > Please change package names to 'org.keycloak.admin.client'
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > > From: "Rodrigo Sasaki" <rodrigopsasaki at gmail.com>
> > > > > > > To: "Stian Thorgersen" <stian at redhat.com>
> > > > > > > Cc: "Juraci Paixão Kröhling" <juraci at kroehling.de>,
> > > > > > keycloak-user at lists.jboss.org
> > > > > > > Sent: Friday, 11 July, 2014 1:51:41 PM
> > > > > > > Subject: Re: [keycloak-user] Java Keycloak REST API Wrapper
> > > > > > >
> > > > > > > Just one more question, I created it with my companies' name in
> > the
> > > > > > > package, should I replace it? Or just upload it as is?
> > > > > > >
> > > > > > > It's br.com.icarros.keycloak.api
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Fri, Jul 11, 2014 at 4:13 AM, Stian Thorgersen <
> > stian at redhat.com>
> > > > > > wrote:
> > > > > > >
> > > > > > > > You can create a new module for it in:
> > > > > > > >
> > > > > > > > integration/admin-client
> > > > > > > >
> > > > > > > > ----- Original Message -----
> > > > > > > > > From: "Rodrigo Sasaki" <rodrigopsasaki at gmail.com>
> > > > > > > > > To: "Stian Thorgersen" <stian at redhat.com>
> > > > > > > > > Cc: "Juraci Paixão Kröhling" <juraci at kroehling.de>,
> > > > > > > > keycloak-user at lists.jboss.org
> > > > > > > > > Sent: Thursday, 10 July, 2014 8:50:00 PM
> > > > > > > > > Subject: Re: [keycloak-user] Java Keycloak REST API Wrapper
> > > > > > > > >
> > > > > > > > > Stian, how should I send the code that I made to the Keycloak
> > > > repo?
> > > > > > > > >
> > > > > > > > > Can you tell me what module name to use, and where to create
> > it?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Tue, Jul 8, 2014 at 10:00 AM, Rodrigo Sasaki <
> > > > > > > > rodrigopsasaki at gmail.com>
> > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > I would really like to do that :) All I'm waiting for is
> > an OK
> > > > to
> > > > > > do
> > > > > > > > it,
> > > > > > > > > > because it was built inside the company, so I need
> > approval.
> > > > > > > > > >
> > > > > > > > > > But I really believe it'll get a lot better when it's out
> > > > there,
> > > > > > and
> > > > > > > > you
> > > > > > > > > > can all pitch in
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Tue, Jul 8, 2014 at 9:55 AM, Stian Thorgersen <
> > > > stian at redhat.com
> > > > > > >
> > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > >> Ideal way to contribute it to Keycloak would be if you
> > fork
> > > > the
> > > > > > > > Keycloak
> > > > > > > > > >> repo, add a module and do a PR ;)
> > > > > > > > > >>
> > > > > > > > > >> ----- Original Message -----
> > > > > > > > > >> > From: "Rodrigo Sasaki" <rodrigopsasaki at gmail.com>
> > > > > > > > > >> > To: "Juraci Paixão Kröhling" <juraci at kroehling.de>
> > > > > > > > > >> > Cc: keycloak-user at lists.jboss.org
> > > > > > > > > >> > Sent: Tuesday, 8 July, 2014 1:50:14 PM
> > > > > > > > > >> > Subject: Re: [keycloak-user] Java Keycloak REST API
> > Wrapper
> > > > > > > > > >> >
> > > > > > > > > >> > Oh yes, I believe it is already very usable.
> > > > > > > > > >> >
> > > > > > > > > >> > All I need now is to get my manager to agree to make
> > this
> > > > repo
> > > > > > > > public,
> > > > > > > > > >> > because there is a policy that all repos are private in
> > this
> > > > > > project
> > > > > > > > > >> we're
> > > > > > > > > >> > working in, but I don't think we'll have problems with
> > > > this. I
> > > > > > > > pitched
> > > > > > > > > >> him
> > > > > > > > > >> > the idea of contributing to Keycloak and he seemed to
> > like
> > > > it
> > > > > > > > > >> >
> > > > > > > > > >> >
> > > > > > > > > >> > On Tue, Jul 8, 2014 at 9:32 AM, Juraci Paixão Kröhling <
> > > > > > > > > >> juraci at kroehling.de
> > > > > > > > > >> > > wrote:
> > > > > > > > > >> >
> > > > > > > > > >> >
> > > > > > > > > >> > -----BEGIN PGP SIGNED MESSAGE-----
> > > > > > > > > >> > Hash: SHA512
> > > > > > > > > >> >
> > > > > > > > > >> > Hello Rodrigo,
> > > > > > > > > >> >
> > > > > > > > > >> > Do you have news about this? I'm working on a task that
> > > > would
> > > > > > > > require
> > > > > > > > > >> > me to do something similar, so, I think it would best
> > if we
> > > > can
> > > > > > > > > >> > collaborate on this API :-)
> > > > > > > > > >> >
> > > > > > > > > >> > If/when you have some time, we could have a chat via IRC
> > > > > > > > (jpkroehling
> > > > > > > > > >> > at #keycloak on freenode).
> > > > > > > > > >> >
> > > > > > > > > >> > - - Juca.
> > > > > > > > > >> >
> > > > > > > > > >> > On 06/20/2014 10:00 PM, Rodrigo Sasaki wrote:
> > > > > > > > > >> > > I'm working on a Java-based wrapper for the REST API,
> > to
> > > > make
> > > > > > it
> > > > > > > > > >> > > look more OO, abstracting the access to servers.
> > > > > > > > > >> > >
> > > > > > > > > >> > > It uses methods such as
> > > > > > > > > >> > >
> > > > > > > > > >> > > User bill = realm.getUser("bburke")
> > > > List<RoleRepresentation>
> > > > > > roles
> > > > > > > > > >> > > = bill.getApplicationRoleMappings("customer-portal");
> > > > > > > > > >> > >
> > > > > > > > > >> > > It's still in it's early stages, but if you find it
> > > > > > interesting,
> > > > > > > > > >> > > I'd be happy to create a repo for other Java users to
> > use
> > > > it,
> > > > > > and
> > > > > > > > > >> > > adapt it based on suggestions aswell.
> > > > > > > > > >> >
> > > > > > > > > >> > -----BEGIN PGP SIGNATURE-----
> > > > > > > > > >> > Version: GnuPG v2
> > > > > > > > > >> > Comment: Using GnuPG with Thunderbird -
> > > > > > http://www.enigmail.net/
> > > > > > > > > >> >
> > > > > > > > > >> >
> > > > iQEcBAEBCgAGBQJTu+ThAAoJEDnJtskdmzLM4PcH/jShu9J6nnV92HqSyqyy4y7d
> > > > > > > > > >> >
> > > > snhFqt4G+aqyhdH4iiOUbV36Zb07fPnO5w7s9vcr79YLGjuAWaODIzU1D1yZxbyA
> > > > > > > > > >> >
> > > > X4e3y5ClCSZMefHGSXoCOs7U+cVuCAUivCXBhe+hIb4pM/2krlhaS+ai3I2Ur43Z
> > > > > > > > > >> >
> > > > 5uzPS+pz983y2i1UGkhJBzqv8MVabNPq3vC+LX2bK9vEmd4Qiz0LdC9jwP23DZY9
> > > > > > > > > >> >
> > > > srdtReO5uC0/HjtfzrNP+ErY1WpIEFAuHW5abtL7HHwvdZYNgYUIj6f8w8oGGLMp
> > > > > > > > > >> >
> > > > iaHvbFMPFmuqNisDqbOWf6OtG7E3Nk2anqeUu5qcvCaPyMQA8edvgctc4a2jbJc=
> > > > > > > > > >> > =3O4p
> > > > > > > > > >> > -----END PGP SIGNATURE-----
> > > > > > > > > >> > _______________________________________________
> > > > > > > > > >> > keycloak-user mailing list
> > > > > > > > > >> > keycloak-user at lists.jboss.org
> > > > > > > > > >> > https://lists.jboss.org/mailman/listinfo/keycloak-user
> > > > > > > > > >> >
> > > > > > > > > >> >
> > > > > > > > > >> >
> > > > > > > > > >> > --
> > > > > > > > > >> > Rodrigo Sasaki
> > > > > > > > > >> >
> > > > > > > > > >> > _______________________________________________
> > > > > > > > > >> > keycloak-user mailing list
> > > > > > > > > >> > keycloak-user at lists.jboss.org
> > > > > > > > > >> > https://lists.jboss.org/mailman/listinfo/keycloak-user
> > > > > > > > > >>
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > Rodrigo Sasaki
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Rodrigo Sasaki
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Rodrigo Sasaki
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Rodrigo Sasaki
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Rodrigo Sasaki
> > >
> >
> 
> 
> 
> --
> Rodrigo Sasaki
> 



More information about the keycloak-user mailing list