01: /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
02: *
03: * Licensed under the Apache License, Version 2.0 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * Unless required by applicable law or agreed to in writing, software
10: * distributed under the License is distributed on an "AS IS" BASIS,
11: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: * See the License for the specific language governing permissions and
13: * limitations under the License.
14: */
15:
16: package org.acegisecurity.event.authentication;
17:
18: import org.acegisecurity.Authentication;
19:
20: import org.springframework.util.Assert;
21:
22: /**
23: * Indicates an interactive authentication was successful.<P>The <code>ApplicationEvent</code>'s
24: * <code>source</code> will be the <code>Authentication</code> object.</p>
25: *
26: * @author Ben Alex
27: * @version $Id: InteractiveAuthenticationSuccessEvent.java 1519 2006-05-29 15:06:32Z benalex $
28: */
29: public class InteractiveAuthenticationSuccessEvent extends
30: AbstractAuthenticationEvent {
31: //~ Instance fields ================================================================================================
32:
33: private Class generatedBy;
34:
35: //~ Constructors ===================================================================================================
36:
37: public InteractiveAuthenticationSuccessEvent(
38: Authentication authentication, Class generatedBy) {
39: super (authentication);
40: Assert.notNull(generatedBy);
41: this .generatedBy = generatedBy;
42: }
43:
44: //~ Methods ========================================================================================================
45:
46: /**
47: * Getter for the <code>Class</code> that generated this event. This can be useful for generating
48: * additional logging information.
49: *
50: * @return the class
51: */
52: public Class getGeneratedBy() {
53: return generatedBy;
54: }
55: }
|