Refactor DAO authentication failure events under a consistent abstract superclass (thanks to Mark St Godard for suggestion).
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2004 Acegi Technology Pty Limited
|
||||
/* Copyright 2004, 2005 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,7 +27,7 @@ import net.sf.acegisecurity.UserDetails;
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AuthenticationFailureAccountExpiredEvent
|
||||
extends AuthenticationEvent {
|
||||
extends AuthenticationFailureEvent {
|
||||
//~ Constructors ===========================================================
|
||||
|
||||
public AuthenticationFailureAccountExpiredEvent(
|
||||
|
||||
+2
-1
@@ -26,7 +26,8 @@ import net.sf.acegisecurity.UserDetails;
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AuthenticationFailureAccountLockedEvent extends AuthenticationEvent {
|
||||
public class AuthenticationFailureAccountLockedEvent
|
||||
extends AuthenticationFailureEvent {
|
||||
//~ Constructors ===========================================================
|
||||
|
||||
public AuthenticationFailureAccountLockedEvent(
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2004 Acegi Technology Pty Limited
|
||||
/* Copyright 2004, 2005 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,7 +27,7 @@ import net.sf.acegisecurity.UserDetails;
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AuthenticationFailureCredentialsExpiredEvent
|
||||
extends AuthenticationEvent {
|
||||
extends AuthenticationFailureEvent {
|
||||
//~ Constructors ===========================================================
|
||||
|
||||
public AuthenticationFailureCredentialsExpiredEvent(
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2004 Acegi Technology Pty Limited
|
||||
/* Copyright 2004, 2005 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,7 +26,8 @@ import net.sf.acegisecurity.UserDetails;
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AuthenticationFailureDisabledEvent extends AuthenticationEvent {
|
||||
public class AuthenticationFailureDisabledEvent
|
||||
extends AuthenticationFailureEvent {
|
||||
//~ Constructors ===========================================================
|
||||
|
||||
public AuthenticationFailureDisabledEvent(Authentication authentication,
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/* Copyright 2004, 2005 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.sf.acegisecurity.providers.dao.event;
|
||||
|
||||
import net.sf.acegisecurity.Authentication;
|
||||
import net.sf.acegisecurity.UserDetails;
|
||||
|
||||
|
||||
/**
|
||||
* Abstract application event which indicates authentication failure for some
|
||||
* reason.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class AuthenticationFailureEvent extends AuthenticationEvent {
|
||||
//~ Constructors ===========================================================
|
||||
|
||||
public AuthenticationFailureEvent(Authentication authentication,
|
||||
UserDetails user) {
|
||||
super(authentication, user);
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2004 Acegi Technology Pty Limited
|
||||
/* Copyright 2004, 2005 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,7 +26,8 @@ import net.sf.acegisecurity.UserDetails;
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AuthenticationFailurePasswordEvent extends AuthenticationEvent {
|
||||
public class AuthenticationFailurePasswordEvent
|
||||
extends AuthenticationFailureEvent {
|
||||
//~ Constructors ===========================================================
|
||||
|
||||
public AuthenticationFailurePasswordEvent(Authentication authentication,
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2004 Acegi Technology Pty Limited
|
||||
/* Copyright 2004, 2005 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,7 +29,7 @@ import net.sf.acegisecurity.UserDetails;
|
||||
* @author Karel Miarka
|
||||
*/
|
||||
public class AuthenticationFailureUsernameNotFoundEvent
|
||||
extends AuthenticationEvent {
|
||||
extends AuthenticationFailureEvent {
|
||||
//~ Constructors ===========================================================
|
||||
|
||||
// ~ Constructors ===========================================================
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2004 Acegi Technology Pty Limited
|
||||
/* Copyright 2004, 2005 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,7 +33,7 @@ import net.sf.acegisecurity.UserDetails;
|
||||
* @author Karel Miarka
|
||||
*/
|
||||
public class AuthenticationFailureUsernameOrPasswordEvent
|
||||
extends AuthenticationEvent {
|
||||
extends AuthenticationFailureEvent {
|
||||
//~ Constructors ===========================================================
|
||||
|
||||
public AuthenticationFailureUsernameOrPasswordEvent(
|
||||
|
||||
Reference in New Issue
Block a user