com.basecmp.core.util
Class LoginConstraintFilter
java.lang.Object
com.basecmp.core.util.LoginConstraintFilter
- public class LoginConstraintFilter
- extends java.lang.Object
LoginConstraintFilter applies security-checks of configured
LoginConstraint-Implementations (@see com.basecmp.core.util.LoginConstraint).
Each implementations defines it's own configvalues which are nonetheless
defined along with this filter's configvalues!
Created on 08.01.2007
- Author:
- Wolfgang Schröder
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONFIG_PARAM_EXCLUDE_PATH_PATTERN
public static final java.lang.String CONFIG_PARAM_EXCLUDE_PATH_PATTERN
- See Also:
- Constant Field Values
CONFIG_PARAM_FORCE_LOGIN_URL
public static final java.lang.String CONFIG_PARAM_FORCE_LOGIN_URL
- See Also:
- Constant Field Values
CONFIG_PARAM_LOGIN_CONSTRAINTS
public static final java.lang.String CONFIG_PARAM_LOGIN_CONSTRAINTS
- See Also:
- Constant Field Values
CONFIG_PARAM_LOGIN_DISABLED_URL
public static final java.lang.String CONFIG_PARAM_LOGIN_DISABLED_URL
- See Also:
- Constant Field Values
REQUEST_ATTRIBUTE_ATTEMPTS
public static final java.lang.String REQUEST_ATTRIBUTE_ATTEMPTS
- See Also:
- Constant Field Values
LoginConstraintFilter
public LoginConstraintFilter()
destroy
public void destroy()
disableLoginForUser
public static void disableLoginForUser(java.lang.String username,
java.util.Date disabledUntil)
doFilter
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws java.io.IOException,
ServletException
- Throws:
java.io.IOException
ServletException
getFailedAttemptCount
public static int getFailedAttemptCount(java.lang.String username)
getInstance
public static LoginConstraintFilter getInstance(java.lang.String filterName)
- Delivers the instance identified by the given filtername from web.xml.
getLastFailedAttemptTimeForUser
public static java.lang.Long getLastFailedAttemptTimeForUser(java.lang.String username)
getReenabledTimeForDisabledUser
public static java.util.Date getReenabledTimeForDisabledUser(java.lang.String username)
getWebappPathName
public java.lang.String getWebappPathName()
init
public void init(FilterConfig config)
throws ServletException
- Throws:
ServletException
isLoginForUserDisabled
public static boolean isLoginForUserDisabled(java.lang.String username)
isRootWebapp
public boolean isRootWebapp()
logFailedAttempt
public static void logFailedAttempt(java.lang.String loginname,
boolean redirect,
PageContext pageContext)
throws java.io.IOException
- Logs a false login-attempt per username and stores the values
REQUEST_ATTRIBUTE_ATTEMPTS and REQUEST_ATTRIBUTE_MAX_ATTEMPTS as
String-Attributes in the given request-object for display-purposes in a
JSP.
- Throws:
java.io.IOException
redirectToDisabledUrl
public void redirectToDisabledUrl(HttpServletResponse response,
java.lang.String loginname)
throws java.io.IOException
- Throws:
java.io.IOException
resetAccount
public static void resetAccount(java.lang.String username)
- Resets the account from failed login-attempts
Copyright © 2004 by basecmp® - Professional Web Solutions