<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 &lt;<a href="mailto:jeremy@jeremysimon.com">jeremy@jeremysimon.com</a>&gt;<br>Date: Mon, Jan 18, 2016 at 12:11 PM<br>Subject: Re: [keycloak-user] Spring Boot REST Service Example(s)<br>To:  &lt;<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>&gt;<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 &quot;You also need to specify the J2EE<br>
security config that would normally go in the web.xml&quot;?  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 &lt;<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt; wrote:<br>
&gt; Andrzej already replied to this earlier:<br>
&gt;<br>
&gt; take a look at these examples:<br>
&gt; <a href="https://github.com/agolPL/keycloak-spring-demo" rel="noreferrer" target="_blank">https://github.com/agolPL/keycloak-spring-demo</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On 1/14/2016 6:44 PM, Jeremy Simon wrote:<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; Would anyone be willing to point me to some good working examples that<br>
&gt;&gt; are REST services built with Spring Boot but can leverage Keycloak for<br>
&gt;&gt; authentication?  I had no trouble integrating a webapp with the SAML<br>
&gt;&gt; protocol, but this OpenID Connect (/Oauth2?) area of things is really<br>
&gt;&gt; confusing.<br>
&gt;&gt;<br>
&gt;&gt; All I&#39;m trying to do is security the REST endpoints I made and then<br>
&gt;&gt; when I actually hit a controller, also be able to pull some role or<br>
&gt;&gt; attribute information off the Authentication token.<br>
&gt;&gt;<br>
&gt;&gt; I tried to cobble together something using the reference guide and the<br>
&gt;&gt; adaptors sections, but to no avail.  In particular I followed the 8.9<br>
&gt;&gt; Spring Boot Adaptor but I get 302s and a this in the response if i try<br>
&gt;&gt; a rest client...<br>
&gt;&gt;<br>
&gt;&gt; ----<br>
&gt;&gt; 302 Found<br>
&gt;&gt;<br>
&gt;&gt; form<br>
&gt;&gt;<br>
&gt;&gt; HEADERS<br>
&gt;&gt; Content-Length:0 Bytes<br>
&gt;&gt; Date:<br>
&gt;&gt; 2016 Jan 14 18:41:13<br>
&gt;&gt; Location:<a href="http://localhost:11080/auth/realms/jeremy/protocol/openid-connect/auth?response_type=code&amp;client_id=try&amp;redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fadmin&amp;state=1%2F82011a10-3b29-44eb-9801-e723c03c94bf&amp;login=true" rel="noreferrer" target="_blank">http://localhost:11080/auth/realms/jeremy/protocol/openid-connect/auth?response_type=code&amp;client_id=try&amp;redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fadmin&amp;state=1%2F82011a10-3b29-44eb-9801-e723c03c94bf&amp;login=true</a><br>
&gt;&gt; S<br>
&gt;&gt;<br>
&gt;&gt; ----<br>
&gt;&gt;<br>
&gt;&gt; At any rate, I tried some extra spring security and other mentions<br>
&gt;&gt; down further in the guide, but I&#39;m definitely digging myself into a<br>
&gt;&gt; little hole!  Any help would be greatly appreciated!<br>
&gt;&gt;<br>
&gt;&gt; Possibly uneducated guess with this subject, can Spring Security OAuth<br>
&gt;&gt; be used with this?  Probably can&#39;t with the OpenID JWT responses?<br>
&gt;&gt;<br>
&gt;&gt; jeremy<br>
&gt;&gt; <a href="mailto:jeremy@jeremysimon.com" target="_blank">jeremy@jeremysimon.com</a><br>
&gt;&gt; <a href="http://www.JeremySimon.com" rel="noreferrer" target="_blank">www.JeremySimon.com</a><br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; keycloak-user mailing list<br>
&gt;&gt; <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
&gt;<br>
&gt; --<br>
&gt; Bill Burke<br>
&gt; JBoss, a division of Red Hat<br>
&gt; <a href="http://bill.burkecentral.com" rel="noreferrer" target="_blank">http://bill.burkecentral.com</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; keycloak-user mailing list<br>
&gt; <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
&gt; <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>