java.lang.Object
org.securityfilter.authenticator.FormAuthenticator
- All Implemented Interfaces:
- Authenticator
- public class FormAuthenticator
- extends java.lang.Object
- implements Authenticator
FormAuthenticator - authenticator implementation for the FORM auth method.
- Version:
- $Revision: 1.3 $ $Date: 2003/10/25 12:43:21 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGIN_SUBMIT_PATTERN_KEY
public static final java.lang.String LOGIN_SUBMIT_PATTERN_KEY
- See Also:
- Constant Field Values
DEFAULT_LOGIN_SUBMIT_PATTERN
public static final java.lang.String DEFAULT_LOGIN_SUBMIT_PATTERN
- See Also:
- Constant Field Values
loginSubmitPattern
protected java.lang.String loginSubmitPattern
FORM_USERNAME
protected static final java.lang.String FORM_USERNAME
- See Also:
- Constant Field Values
FORM_PASSWORD
protected static final java.lang.String FORM_PASSWORD
- See Also:
- Constant Field Values
loginPage
protected java.lang.String loginPage
loginPagePattern
protected org.securityfilter.filter.URLPattern loginPagePattern
errorPage
protected java.lang.String errorPage
errorPagePattern
protected org.securityfilter.filter.URLPattern errorPagePattern
defaultPage
protected java.lang.String defaultPage
realm
protected org.securityfilter.realm.SecurityRealmInterface realm
FormAuthenticator
public FormAuthenticator()
init
public void init(javax.servlet.FilterConfig filterConfig,
org.securityfilter.config.SecurityConfig securityConfig)
throws java.lang.Exception
- Initilize this Authenticator.
- Specified by:
init in interface Authenticator
getAuthMethod
public java.lang.String getAuthMethod()
- Returns FORM as the authentication method.
- Specified by:
getAuthMethod in interface Authenticator
processLogin
public boolean processLogin(org.securityfilter.filter.SecurityRequestWrapper request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.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).
- Specified by:
processLogin in interface Authenticator
showLogin
public void showLogin(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
- Show the login page.
- Specified by:
showLogin in interface Authenticator
getContinueToURL
private java.lang.String getContinueToURL(javax.servlet.http.HttpServletRequest request)
- FormAuthenticator has a special case where the user should be sent to a default page if the user
spontaneously submits a login request.
bypassSecurityForThisRequest
public boolean bypassSecurityForThisRequest(org.securityfilter.filter.SecurityRequestWrapper request,
org.securityfilter.filter.URLPatternMatcher patternMatcher)
throws java.lang.Exception
- The login and error pages should be viewable, even if they would otherwise be blocked by a security constraint.
- Specified by:
bypassSecurityForThisRequest in interface Authenticator
stripQueryString
private java.lang.String stripQueryString(java.lang.String uri)
- Utility method to strip the query string from a uri.