I'm developing an Wicket GAE application, and everything looks fine. But I have one question, how to correctly integrate GAE's security with Wicket?
I have two security-related use cases:
- Pages allowed for authenticated users: only logged user can see them - other users must be redirected to Google's authentication (and, after success, get back to the same page)
- Pages with actions allowed for some users: any user can see the page, but only special users can run actions (ex: anyone can read the news, but only the author of the specific post can edit).
The second one I guess I can do by "hiding" the forms and/or actions (other suggestions are welcome). The first one I could not find how to do.
GAE instructs to use servlet-based authentication or some API calls to redirect to Google's auth with a return link. I guess this works with Wicket's redirection, but shouldn't it be a 401 redirect? And, more important: how to test it?
If I use Wicket's security, how can I define which pages user can access and how to send to Google's auth?