You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2018/04/19 05:39:39 UTC

Re: Wanted: example for Spring Security with wicket-auth-roles

Hi Tom,

I do not remember everything by heart but basically it is:
1. Provide impl of Spring Security's UserDetailsService and make it a @Bean
2. In your AuthenticatedWebSession#authenticate() impl use Spring
Security's Authentication to do the work. It was something like
SecurityContextHolder.getContext().getAuthentication().autheticate(new
UsernamePasswordAuthentication(username, password))

In Spring Security's config (HttpSecurity) you need to tell SS what is the
url to your login and logout pages, and that you want to enable
"rememberMe" functionality.
You can use both SS and/or Wicket to authenticate access to pages and
resources by their mount paths.

On Wed, Apr 18, 2018 at 5:58 PM, Tom Götz <to...@decoded.de> wrote:

> Hi!
>
> Does anyone have a working example for an integration of Spring Security
> and wicket-auth-roles? We currently use Wicket 7.9.0 and Spring Boot 2.x …
>
> We’d like to authenticate users via a login form (SignInPanel) and also
> use a „remember me“ cookie based authentication.
>
> Anyone?
>
>
> Cheers,
>    Tom
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Wanted: example for Spring Security with wicket-auth-roles

Posted by David Beer <da...@gmail.com>.
Hi Tom

Please have a look at this project I did
https://github.com/dmbeer/wicket-7-spring-security

From what I remember the process is pretty much as Martin says. If you look
through the archives I am sure you will find my explanation.

Thanks

David

On 19 April 2018 at 06:39, Martin Grigorov <mg...@apache.org> wrote:

> Hi Tom,
>
> I do not remember everything by heart but basically it is:
> 1. Provide impl of Spring Security's UserDetailsService and make it a @Bean
> 2. In your AuthenticatedWebSession#authenticate() impl use Spring
> Security's Authentication to do the work. It was something like
> SecurityContextHolder.getContext().getAuthentication().autheticate(new
> UsernamePasswordAuthentication(username, password))
>
> In Spring Security's config (HttpSecurity) you need to tell SS what is the
> url to your login and logout pages, and that you want to enable
> "rememberMe" functionality.
> You can use both SS and/or Wicket to authenticate access to pages and
> resources by their mount paths.
>
> On Wed, Apr 18, 2018 at 5:58 PM, Tom Götz <to...@decoded.de> wrote:
>
> > Hi!
> >
> > Does anyone have a working example for an integration of Spring Security
> > and wicket-auth-roles? We currently use Wicket 7.9.0 and Spring Boot 2.x
> …
> >
> > We’d like to authenticate users via a login form (SignInPanel) and also
> > use a „remember me“ cookie based authentication.
> >
> > Anyone?
> >
> >
> > Cheers,
> >    Tom
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>