Reputation: 439
I would like to use an OAuth2 authentication with my Apache Wicket website.
My website is using Spring Boot and Spring Security for the authentication part, but I would like to use the @AuthorizeInstantiation Wicket annotation to protect the pages.
Can I use these frameworks together and how ?
Thank you.
Upvotes: 0
Views: 435
Reputation: 17513
Sure, you can combine them!
See wicket-auth-roles module for inspiration how to implement authentication in Wicket. The difference with Spring Security is that you need to use SecurityContextHolder.getContext().getAuthentication()
to get the currently logged in user/principal.
If you decide to extend from AbstractAuthenticatedWebSession
then its public abstract boolean isSignedIn();
should use Spring Security APIs to get the Principal.
Upvotes: 1