org.apache.jetspeed.security.impl
Class LoginValidationValveImpl

java.lang.Object
  extended by org.apache.jetspeed.pipeline.valve.AbstractValve
      extended by org.apache.jetspeed.security.impl.LoginValidationValveImpl
All Implemented Interfaces:
LoginValidationValve, org.apache.jetspeed.pipeline.valve.Valve

public class LoginValidationValveImpl
extends AbstractValve
implements LoginValidationValve

LoginValidationValve

Version:
$Id: LoginValidationValveImpl.java 544402 2007-06-05 06:20:00Z taylor $
Author:
Ate Douma

Field Summary
private static org.apache.commons.logging.Log log
           
private  int maxNumberOfAuthenticationFailures
           
private  List sessionAttributes
           
 
Constructor Summary
LoginValidationValveImpl(int maxNumberOfAuthenticationFailures)
           Creates a LoginValidationValveImpl instance which can evaluate PasswordCredential.getAuthenticationFailures() to determine if a user only has one login attempt available before the maxNumberOfAuthenticationFailures parameter value is reached and the credential will be disabled.
LoginValidationValveImpl(int maxNumberOfAuthenticationFailures, List sessionAttributes)
           Creates a LoginValidationValveImpl instance which can evaluate PasswordCredential.getAuthenticationFailures() to determine if a user only has one login attempt available before the maxNumberOfAuthenticationFailures parameter value is reached and the credential will be disabled.
LoginValidationValveImpl(List sessionAttributes)
          Creates a LoginValidationValveImpl instance which doesn't evaluate the maxNumberOfAuthenticationFailures for LoginConstant.ERROR_FINAL_LOGIN_ATTEMPT error reporting.
 
Method Summary
private  void clearSessionAttributes(org.apache.jetspeed.request.RequestContext request)
           
 void invoke(org.apache.jetspeed.request.RequestContext request, org.apache.jetspeed.pipeline.valve.ValveContext context)
           
 String toString()
           
 
Methods inherited from class org.apache.jetspeed.pipeline.valve.AbstractValve
initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.jetspeed.pipeline.valve.Valve
initialize
 

Field Detail

log

private static final org.apache.commons.logging.Log log

maxNumberOfAuthenticationFailures

private int maxNumberOfAuthenticationFailures

sessionAttributes

private List sessionAttributes
Constructor Detail

LoginValidationValveImpl

public LoginValidationValveImpl(List sessionAttributes)
Creates a LoginValidationValveImpl instance which doesn't evaluate the maxNumberOfAuthenticationFailures for LoginConstant.ERROR_FINAL_LOGIN_ATTEMPT error reporting.


LoginValidationValveImpl

public LoginValidationValveImpl(int maxNumberOfAuthenticationFailures)

Creates a LoginValidationValveImpl instance which can evaluate PasswordCredential.getAuthenticationFailures() to determine if a user only has one login attempt available before the maxNumberOfAuthenticationFailures parameter value is reached and the credential will be disabled.

The provided maxNumberOfAuthenticationFailures value should be equal to the value configured for the MaxPasswordAuthenticationFailuresInterceptor (and > 2 to be useful).


LoginValidationValveImpl

public LoginValidationValveImpl(int maxNumberOfAuthenticationFailures,
                                List sessionAttributes)

Creates a LoginValidationValveImpl instance which can evaluate PasswordCredential.getAuthenticationFailures() to determine if a user only has one login attempt available before the maxNumberOfAuthenticationFailures parameter value is reached and the credential will be disabled.

The provided maxNumberOfAuthenticationFailures value should be equal to the value configured for the MaxPasswordAuthenticationFailuresInterceptor (and > 2 to be useful).

Method Detail

invoke

public void invoke(org.apache.jetspeed.request.RequestContext request,
                   org.apache.jetspeed.pipeline.valve.ValveContext context)
            throws org.apache.jetspeed.pipeline.PipelineException
Specified by:
invoke in interface org.apache.jetspeed.pipeline.valve.Valve
Specified by:
invoke in class AbstractValve
Throws:
org.apache.jetspeed.pipeline.PipelineException
See Also:
Valve.invoke(org.apache.jetspeed.request.RequestContext, org.apache.jetspeed.pipeline.valve.ValveContext)

clearSessionAttributes

private void clearSessionAttributes(org.apache.jetspeed.request.RequestContext request)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.