Spring Security Framework

org.springframework.security
Class MockAuthenticationManager

java.lang.Object
  extended by org.springframework.security.AbstractAuthenticationManager
      extended by org.springframework.security.MockAuthenticationManager
All Implemented Interfaces:
AuthenticationManager

public class MockAuthenticationManager
extends AbstractAuthenticationManager

Simply accepts as valid whatever is passed to it, if grantAccess is set to true.

Version:
$Id$
Author:
Ben Alex, Wesley Hall

Constructor Summary
MockAuthenticationManager()
           
MockAuthenticationManager(boolean grantAccess)
           
 
Method Summary
 Authentication doAuthentication(Authentication authentication)
          Concrete implementations of this class override this method to provide the authentication service.
 
Methods inherited from class org.springframework.security.AbstractAuthenticationManager
authenticate, setClearExtraInformation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockAuthenticationManager

public MockAuthenticationManager(boolean grantAccess)

MockAuthenticationManager

public MockAuthenticationManager()
Method Detail

doAuthentication

public Authentication doAuthentication(Authentication authentication)
                                throws AuthenticationException
Description copied from class: AbstractAuthenticationManager
Concrete implementations of this class override this method to provide the authentication service.

The contract for this method is documented in the AuthenticationManager.authenticate(Authentication).

Specified by:
doAuthentication in class AbstractAuthenticationManager
Parameters:
authentication - the authentication request object
Returns:
a fully authenticated object including credentials
Throws:
AuthenticationException - if authentication fails

Spring Security Framework

Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.