on 4/3/00 7:18 AM, Jeffrey D.Brekke <[EMAIL PROTECTED]> wrote:
> We are looking to implement our own authentication. So what we did was write
> our own LoginUser action, verify the username/password, and get a User object
> from the factory and populate it ourselves from within the action. Now, since
> TurbineUserPeer is all static it is trying to call initTableSchema() and we
> have no table schema/db.
>
> My question is how to get a user object without dependencies on a db. Do we
> have to implement the User interface ourselves? Should we implement our own
> peer also?
Yes, you need to implement your own TurbineUser class that does not make any
calls to TurbineUserPeer. If TurbineUserPeer is never called, then
initTableSchema() will also never be called. You don't need to implement
your own TurbineUserPeer if you don't want to.
You need to change the following properties in TurbineResources.properties
to point to your own classes...
# This is the class that implements the User interface
# Default: org.apache.turbine.om.user.TurbineUser
user.class=org.apache.turbine.om.user.TurbineUser
# This is the default action to log a user in.
# Default: LoginUser
action.login=LoginUser
(*possibly*)...
# This is the default action to validate whether or not
# a session is valid. For example, if you want to make
# sure if a user has already logged in or not.
# Default: SessionValidator
action.sessionvalidator=sessionvalidator.DefaultSessionValidator
I hope that helps.
-jon
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]