users@glassfish.java.net

container based authentication - how to change the queries ?

From: Felipe Gaúcho <fgaucho_at_gmail.com>
Date: Tue, 24 Feb 2009 19:20:43 +0100

Hi there,

I am using a container based authentication, and it works fine.. but
now I have a question about the login management...

I want to implement a use-case "activate or deactivate accounts"..

so, my usertable has basically the columns "login" and "password"...

so, how do I implement the activation of an account ?

* if I include the hashed password in the table, the container will
accept the authentication, so for now I am including a third column
"pending" just to keep the password until the customer confirmation of
the account, and then I move the password to the column "password".. a
bit hacky ..

Is there a more elegant way to do that ? can I customize the queries
used by the container ?

other: I don't have a foreign key in my usertable (don't know how to
do that with JPA/Toplink), so for each row in the usertable I have
another one in the grouptable :( is there a way to include a secondary
table mapping the two entities - and do that in a way the container
can see this nXn relationship ??


-- 
Please help to test this application:
http://fgaucho.dyndns.org:8080/cejug-classifieds-richfaces