Why isn't AuthenticatorFactory a plug-in?
"Robert Taylor" <rtaylor-i88pJroZvhRWk0Htik3J/[email protected]> Mon, 13 Oct 2003 13:48:08 -0400
| Newsgroups | gmane.comp.java.securityfilter.user |
|---|---|
| Message-ID | <[email protected]> |
I want to use SecurityFilter, but I have a need to execute additional logic
in the FormAuthenticator.
The javadocs for AuthenticatorFactory state that its design to easily
extend.
Why not design it as a plug in to the SecurityFilter?
Couldn't you create an interface like:
public interface IAuthenticatorFactory {
public Authenticator createAuthenticator(
FilterConfig filterConfig,
SecurityConfig securityConfig
) throws Exception;
}
And then define something in the security-config.xml file like:
<authenticatorfactory
className="org.securityfilter.example.BaseAuthenticatorFactory"/>
And then have SecurityFilter read an init parameter for the specified
implementation
of IAuthenticatorFactory and instantiate it on the fly.
If not found it could use the default implementation.
Right now, I would have to extend the SecurityFilter and override the init()
just to
use my own AuthenticatorFactory.
Am I missing something simple, because this seems like such an obvious and
trivial modification.
robert
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php