Hi Brian, This makes perfect sense to me thanks. The one hurdle though that I seem to have (and especially with trying to follow examples from other sample apps) is determining how much of what to put into the listener versus the manager/services - Is there a source that you find useful to refer to in such situations? The one thing that makes it most difficult is when referring to other apps (and from what I can make out), they appear to be breaking the general guidelines for structuring an app in the framework!
Thanks again for your help Leigh On Oct 29, 1:40 pm, "Brian Kotek" <[EMAIL PROTECTED]> wrote: > A few thoughts here: > > In general, what you're laying out here involves too much logic in the > Listener. > > If the data on the two LDAP servers doesn't change, why create new instances > of those components for each authentication attempt? > > I wouldn't want my Listeners to have to pass anything related to the LDAP > server into the SecurityManager. Nothing outside the SecurityManager should > even know that the authentication involves an LDAP server. > > If SecurityManager is a service layer component, shouldn't it be a > Singleton? If so, this should not be instantiated on every authentication > request. > > I would not have the Listener need to know that it must call > authenticateUser() and authorizeUser(). I would just have some generic > method like validateLogin(), and internally the SecurityManager handles > hitting the LDAP servers and then hitting the database for the user info > (probaby via a User service). Nothing outside the SecurityManger should know > that there is a two step process involved (hitting LDAP and then hitting the > database). > > I would not have the Listener be responsible for getting back a User object > and pushing it into the session. The Listener shouldn't know anything about > the session scope or that it is even being used. I'd have the > SecurityManager push the User object into the session via a session facade > (probably what you're calling SessionManager). > > Hope this helps. > > Brian > > On 10/28/07, Leigh <[EMAIL PROTECTED]> wrote: > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
