Hi David,

Latest Spring Security release is 4.1.4, there is no 7.x ;-)

I cannot share my project but the integration is quite simple.

1) define the Spring config (with an impl of UserDetailsService!)
2) in your login logic (MyAuthenticatedWebSession#signin() or
MyLoginForm#onSubmit()) use Spring AuthenticationService#authenticate(new
UsernamePasswordAuthenticationToken(username, password))
3) if 2) is successful then you can use
SecurityContextHolder.getContext().getUser() to get the User returned by
your UserDetailsService with its authorities, i.e. roles. You can use them
in Wicket's RolesAuthorizationStrategy
4) if 2) is not successful then Spring Security will throw very specific
exception with the reason

P.S. I am on my phone now, without access to the application code, so some
class/method names might be slightly wrong but I hope they are good enough
to get you going!

Happy New Year!

On Dec 30, 2016 8:23 PM, "David Beer" <david.m.b...@gmail.com> wrote:

> Hi All
> I am trying to add spring security to wicket 7. I have looked at example
> thomberges did but that doesn't really seem to work. If I comment out the
> code in the SecureWebsession all still seems to authenticate somehow.
> Is there an up to date project anyone has of integrating spring security
> with apache wicket? It would be really useful if a basic project could be
> shared.
> Thanks
> David
> Happy New Year All

Reply via email to