Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tapestry 5 user authentication

I was following the very slim tutorial on the Tapestry website for Tapestry 5 and was introduced to very basic database interactions but not how to do user authentication. Where do I go for more comprehensive guidance in tapestry 5? I went to the tapestry wiki (http://wiki.apache.org/tapestry/Tapestry5HowTos) but I wasn't really looking for a bunch of how-to's. Do you know of any good sources?

like image 622
JPC Avatar asked Nov 16 '10 01:11

JPC


2 Answers

If you need something robust you are probably going to want to use something like Shiro or Spring's security. Both of those can be integrated with Tapestry. Tapestry-security basically just gives you access to Shiro and you can use the Shiro documentation to figure out anything you need to know. Shiro works very well and you can protect pages as well as methods. It has a number of different options so it can be confusing at first as you try to figure out which parts you need, but it doesn't take too much to get started with.

A couple other ideas to look at:

You might try taking a look at the demo application here: http://tapestry.zones.apache.org:8180/tapestry5-hotel-booking/signin

And the source for it here: https://github.com/ccordenier/tapestry5-hotel-booking/

Also take a look at application here: http://wookicentral.com/

And the source for it here: https://github.com/spreadthesource/wooki

like image 50
Mark Avatar answered Oct 04 '22 23:10

Mark


you can 'roll your own' or use one of the 3rd party modules such as tynamo's tapestry-security. even if you do write your own, it's a good idea to see how others have implemented it so have a look at the source.

my first attempt at writing my own security module had me creating a class hierarchy for all my components and pages (inheritance supplied security checks) which does not really follow the tapestry paradigm.

unfortunately it seems fashionable for tapestry and all tapestry modules to have sparse documentation.

like image 29
pstanton Avatar answered Oct 04 '22 21:10

pstanton