<div style="white-space:pre-wrap">Those are a fork of my examples. Before product, I think the Spring Boot adapter needs an update to be based on the Spring adapter. I can do this if if you give me an ETA on how long before code is frozen. </div><br><div class="gmail_quote"><div dir="ltr">---------- Forwarded message ---------<br>From: Jeremy Simon <<a href="mailto:jeremy@jeremysimon.com">jeremy@jeremysimon.com</a>><br>Date: Mon, Jan 18, 2016 at 12:11 PM<br>Subject: Re: [keycloak-user] Spring Boot REST Service Example(s)<br>To: <<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>><br></div><br><br>Thanks! These make a lot more sense. Looks Springy. ;) Based on how<br>
these examples are configured, why would the Keycloak documentation<br>
even mention in section 8.9.2 "You also need to specify the J2EE<br>
security config that would normally go in the web.xml"? Just trying<br>
to get an understanding.<br>
jeremy<br>
<a href="mailto:jeremy@jeremysimon.com" target="_blank">jeremy@jeremysimon.com</a><br>
<a href="http://www.JeremySimon.com" rel="noreferrer" target="_blank">www.JeremySimon.com</a><br>
<br>
<br>
On Thu, Jan 14, 2016 at 6:56 PM, Bill Burke <<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>> wrote:<br>
> Andrzej already replied to this earlier:<br>
><br>
> take a look at these examples:<br>
> <a href="https://github.com/agolPL/keycloak-spring-demo" rel="noreferrer" target="_blank">https://github.com/agolPL/keycloak-spring-demo</a><br>
><br>
><br>
><br>
> On 1/14/2016 6:44 PM, Jeremy Simon wrote:<br>
>> Hi,<br>
>><br>
>> Would anyone be willing to point me to some good working examples that<br>
>> are REST services built with Spring Boot but can leverage Keycloak for<br>
>> authentication? I had no trouble integrating a webapp with the SAML<br>
>> protocol, but this OpenID Connect (/Oauth2?) area of things is really<br>
>> confusing.<br>
>><br>
>> All I'm trying to do is security the REST endpoints I made and then<br>
>> when I actually hit a controller, also be able to pull some role or<br>
>> attribute information off the Authentication token.<br>
>><br>
>> I tried to cobble together something using the reference guide and the<br>
>> adaptors sections, but to no avail. In particular I followed the 8.9<br>
>> Spring Boot Adaptor but I get 302s and a this in the response if i try<br>
>> a rest client...<br>
>><br>
>> ----<br>
>> 302 Found<br>
>><br>
>> form<br>
>><br>
>> HEADERS<br>
>> Content-Length:0 Bytes<br>
>> Date:<br>
>> 2016 Jan 14 18:41:13<br>
>> Location:<a href="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" rel="noreferrer" target="_blank">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</a><br>
>> S<br>
>><br>
>> ----<br>
>><br>
>> At any rate, I tried some extra spring security and other mentions<br>
>> down further in the guide, but I'm definitely digging myself into a<br>
>> little hole! Any help would be greatly appreciated!<br>
>><br>
>> Possibly uneducated guess with this subject, can Spring Security OAuth<br>
>> be used with this? Probably can't with the OpenID JWT responses?<br>
>><br>
>> jeremy<br>
>> <a href="mailto:jeremy@jeremysimon.com" target="_blank">jeremy@jeremysimon.com</a><br>
>> <a href="http://www.JeremySimon.com" rel="noreferrer" target="_blank">www.JeremySimon.com</a><br>
>> _______________________________________________<br>
>> keycloak-user mailing list<br>
>> <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
><br>
> --<br>
> Bill Burke<br>
> JBoss, a division of Red Hat<br>
> <a href="http://bill.burkecentral.com" rel="noreferrer" target="_blank">http://bill.burkecentral.com</a><br>
><br>
> _______________________________________________<br>
> keycloak-user mailing list<br>
> <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
</div>