You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Jesse Alexander (KADA 12)" <al...@csfs.com> on 2002/03/01 13:26:52 UTC

RE: User Registration with Struts query

I'd suggest writing a helper to solve this. The helper would be built with plug-in
realm-specific classes. To make it easier to get access it from a model-class you could 
design it as a singleton, if you want to access it only form an action, store it in 
the servlet-context (== application-wide). To set it up I'd use a a startup-servlet with 
init-parm's that instantiates the helper and its plug-in.

I do not think there is really a standard-mechanism to add to the realm...

hth
Alexander Jesse

-----Original Message-----
From: Emaho, Ghoot [mailto:Ghoot@PETROTECHNICS.co.uk]
Sent: Mittwoch, 27. Februar 2002 14:43
To: struts-user@jakarta.apache.org
Subject: User Registration with Struts query


I have a question regarding registering new users of a struts web app.
 
If the web app is using container managed security, and say form-based authentication, and a registration action is available for new users, is there a way to implement the registration process that is portable ?
 
For instance, if user info is stored in a 'database', the container manages the authentication checks during login. However when a new user completes the registration, the registraion action then needs to 'add' this user, but I dont really want to put the specifics of the user database etc into the registering action, as it may be deployed using LDAP somewhere else.
 
All the other security stuff seems to be portable across implementations, and i know the spec doesnt deal with maintaining users, but does this really mean that I need to implement specific registration for each different user 'database' that may be used ?
 
Ideally I want to do something like:
 
realm.addUser(...)
 
where 'realm' is the user database (LDAP, RDBMS whatever) which would keep the registration action portable.
 
(Note: when I talk about the registration action being portable, i know in real terms this stuff would be in a helper bean/business delegate, so I could have different delegates deal with different databases - i just wanted to keep the question simple, so I say the registration action.)
 
How have you dealt with this ? Is there a portable solution ?
 
Thanks for any feedback
 
Ghoot Emaho
Development Team Leader
Petrotechnics  <http://www.petrotechnics.co.uk/> Ltd

 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>