Thank you for sharing your knowledge, Jeroen! On Tue, Apr 16, 2019 at 12:32 PM Jeroen Steenbeeke < j.steenbeeke...@gmail.com> wrote:
> Hello David, > > Excellent idea! I went ahead and did just that: > https://tech.jeroensteenbeeke.nl/2019/04/16/using-keycloak-with-wicket.html > > Hope it's helpful. > > Regards, > > Jeroen > > Op ma 15 apr. 2019 om 19:53 schreef David Beer <david.m.b...@gmail.com>: > > > Hi Jeroen > > > > This sounds good, I once tried to setup a link between Wicket and > Keycloak, > > would be good if you had a blog post, or posted this on the wicket site, > > along with code examples on github. Just a thought. > > > > Thanks > > > > David > > > > On Thu, 11 Apr 2019 at 09:23, Jeroen Steenbeeke < > j.steenbeeke...@gmail.com > > > > > wrote: > > > > > I've recently created an application that has a Wicket frontend (and > > Spring > > > backend) authenticated by Keycloak. It's a relatively simple > integration > > > really, all pages require a valid Keycloak session, so it uses the > > default > > > Keycloak servlet filter adapter: > > > > > > > > > > > > https://search.maven.org/artifact/org.keycloak/keycloak-servlet-filter-adapter/5.0.0/jar > > > > > > In my setup I've mapped the Keycloak filter to all URLs (before the > > Wicket > > > filter). Using this filter is simply a matter of adding it to your > > web.xml > > > and making sure you have a keycloak.json file in your WEB-INF folder. > > > > > > In Wicket, you can then get the Keycloak context from the RequestCycle: > > > > > > ServletWebRequest request = (ServletWebRequest) > > > RequestCycle.get().getRequest(); > > > HttpServletRequest containerRequest = request.getContainerRequest(); > > > KeycloakSecurityContext securityContext = (KeycloakSecurityContext) > > > containerRequest.getAttribute(KeycloakSecurityContext.class.getName()); > > > > > > Hope this helps. > > > > > > Sincerely, > > > > > > Jeroen > > > > > > > > > Op wo 10 apr. 2019 om 16:43 schreef Calin Pavel <calin.pa...@gmail.com > >: > > > > > > > Hi everybody, > > > > > > > > Did anybody integrated Wicket with Keycloak? > > > > Do you have any sample how this could be done - to restrict access to > > > > pages, to authenticate user .... > > > > > > > > > > > > Thank you, > > > > Calin Pavel > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > > > > > > > > > -- > > > Jeroen Steenbeeke > > > > > > > > -- > Jeroen Steenbeeke >