Logged In: YES
Originator: NO

an analog feature is already shipped in jGuard with an XML file backend entitled "jguardconfiguration.xml".

here are few tips to implement this feature with a database backend:

informations needed to be present are actually loaded as a Map of parameters in the XML file (with the AuthenticationHelper class).
the work is to build this Map of parameters with a database backend.
=> AuthenticationHelper need to be refined to support multiple backends.
an exemple can be viewed (used in webapp) in the net.sf.jguard.jee.listeners.ContextListener class (initAuthentication method).

again, AuthenticationHelper is used to build an AuthenticationManager implementation(initAuthentication method) with a javax.security.auth.login.Configuration (from the JDK) subclass called net.sf.jguard.core.authentication.configuration.jGuardConfiguration which is the 'Authentication kernel' in JAAS, and with the Map of authentication parameters.

hope it helps to implements this feature,