org.securityfilter.authenticator
Interface Authenticator

All Known Implementing Classes:
BasicAuthenticator, FormAuthenticator

public interface Authenticator

Authenticator - interface for a SecurityFilter authenticator module. Implementations correspond to an implementation method, such as FORM or BASIC (others are possible).

Version:
$Revision: 1.2 $ $Date: 2004/07/04 17:05:29 $
Author:
Max Cooper (max@maxcooper.com)

Method Summary
 boolean bypassSecurityForThisRequest(javax.servlet.http.HttpServletRequest request, URLPatternMatcher patternMatcher)
          Return true if security checks should be bypassed for this request.
 String getAuthMethod()
          Get the auth method string for this authentication scheme.
 void init(javax.servlet.FilterConfig filterConfig, SecurityConfig securityConfig)
          Initialize this Authenticator.
 boolean processLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Process any login information that was included in the request, if any.
 void showLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Show the login interface.
 

Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig,
                 SecurityConfig securityConfig)
          throws Exception
Initialize this Authenticator.

Parameters:
filterConfig -
securityConfig -
Throws:
Exception

getAuthMethod

public String getAuthMethod()
Get the auth method string for this authentication scheme.

Returns:
the auth method string for this Authenticator

processLogin

public boolean processLogin(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
                     throws Exception
Process any login information that was included in the request, if any. Returns true if SecurityFilter should abort further processing after the method completes (for example, if a redirect was sent as part of the login processing).

Parameters:
request -
response -
Returns:
true if the filter should return after this method ends, false otherwise
Throws:
Exception

showLogin

public void showLogin(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws IOException
Show the login interface.

Parameters:
request -
response -
Throws:
IOException

bypassSecurityForThisRequest

public boolean bypassSecurityForThisRequest(javax.servlet.http.HttpServletRequest request,
                                            URLPatternMatcher patternMatcher)
                                     throws Exception
Return true if security checks should be bypassed for this request. Example: for FORM based authentication, the login and error pages should always be viewable without being authenticated, even if they would otherwise be blocked by a security constraint.

Parameters:
request -
Returns:
true if security should be bypassed, false otherwise
Throws:
Exception