Re: Integrate Wicket with Keycloak

2019-04-16 Thread Martin Grigorov
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 :
>
> > 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  >:
> > >
> > > > 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
>


Re: Integrate Wicket with Keycloak

2019-04-16 Thread Jeroen Steenbeeke
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 :

> 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  >
> 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 :
> >
> > > 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


Re: Integrate Wicket with Keycloak

2019-04-15 Thread David Beer
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 
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 :
>
> > 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
>


Re: Integrate Wicket with Keycloak

2019-04-11 Thread Jeroen Steenbeeke
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 :

> 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


Re: Integrate Wicket with Keycloak

2019-04-10 Thread Maxim Solodovnik
Not sure this is related to Keycloak

But here is example how to restrict access to pages/components:
https://ci.apache.org/projects/wicket/guide/8.x/single.html#_using_roles_with_annotations

On Wed, 10 Apr 2019 at 21:43, Calin Pavel  wrote:

> 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
>
>

-- 
WBR
Maxim aka solomax


Integrate Wicket with Keycloak

2019-04-10 Thread Calin Pavel

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