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

Jeremy Simon jeremy at jeremysimon.com
Mon Jan 18 09:17:18 EST 2016


Thanks!  These make a lot more sense.  Looks Springy. ;)  Based on how
these examples are configured, why would the Keycloak documentation
even mention in section 8.9.2 "You also need to specify the J2EE
security config that would normally go in the web.xml"?  Just trying
to get an understanding.
jeremy
jeremy at jeremysimon.com
www.JeremySimon.com


On Thu, Jan 14, 2016 at 6:56 PM, Bill Burke <bburke at redhat.com> wrote:
> 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
>
> _______________________________________________
> 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