[keycloak-user] Spring Boot REST Service Example(s)

Bill Burke bburke at redhat.com
Thu Jan 14 18:56:46 EST 2016


Andrzej already replied to this earlier:

take a look at these examples: 
https://github.com/agolPL/keycloak-spring-demo



On 1/14/2016 6:44 PM, Jeremy Simon wrote:
> Hi,
>
> Would anyone be willing to point me to some good working examples that
> are REST services built with Spring Boot but can leverage Keycloak for
> authentication?  I had no trouble integrating a webapp with the SAML
> protocol, but this OpenID Connect (/Oauth2?) area of things is really
> confusing.
>
> All I'm trying to do is security the REST endpoints I made and then
> when I actually hit a controller, also be able to pull some role or
> attribute information off the Authentication token.
>
> I tried to cobble together something using the reference guide and the
> adaptors sections, but to no avail.  In particular I followed the 8.9
> Spring Boot Adaptor but I get 302s and a this in the response if i try
> a rest client...
>
> ----
> 302 Found
>
> form
>
> HEADERS
> Content-Length:0 Bytes
> Date:
> 2016 Jan 14 18:41:13
> Location:http://localhost:11080/auth/realms/jeremy/protocol/openid-connect/auth?response_type=code&client_id=try&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fadmin&state=1%2F82011a10-3b29-44eb-9801-e723c03c94bf&login=true
> S
>
> ----
>
> At any rate, I tried some extra spring security and other mentions
> down further in the guide, but I'm definitely digging myself into a
> little hole!  Any help would be greatly appreciated!
>
> Possibly uneducated guess with this subject, can Spring Security OAuth
> be used with this?  Probably can't with the OpenID JWT responses?
>
> jeremy
> jeremy at jeremysimon.com
> www.JeremySimon.com
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com



More information about the keycloak-user mailing list