Store failed Authentication request in AuthenticationException, using template pattern (patch thanks to Wesley Hall).

This commit is contained in:
Ben Alex
2004-07-24 07:18:04 +00:00
parent 21a98eb41f
commit 951c1a02df
3 changed files with 84 additions and 6 deletions

View File

@@ -20,9 +20,10 @@ package net.sf.acegisecurity;
* <code>grantAccess</code> is set to <code>true</code>.
*
* @author Ben Alex
* @author Wesley Hall
* @version $Id$
*/
public class MockAuthenticationManager implements AuthenticationManager {
public class MockAuthenticationManager extends AbstractAuthenticationManager {
//~ Instance fields ========================================================
private boolean grantAccess = true;
@@ -39,7 +40,7 @@ public class MockAuthenticationManager implements AuthenticationManager {
//~ Methods ================================================================
public Authentication authenticate(Authentication authentication)
public Authentication doAuthentication(Authentication authentication)
throws AuthenticationException {
if (grantAccess) {
return authentication;