1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.acegisecurity;
17
18 /***
19 * Abstract superclass for all exceptions related an {@link Authentication}
20 * object being invalid for whatever reason.
21 *
22 * @author Ben Alex
23 * @version $Id: AuthenticationException.java,v 1.6 2005/11/17 00:55:49 benalex Exp $
24 */
25 public abstract class AuthenticationException extends AcegiSecurityException {
26
27
28 /***
29 * The authentication that related to this exception (may be
30 * <code>null</code>)
31 */
32 private Authentication authentication;
33
34
35
36 /***
37 * Constructs an <code>AuthenticationException</code> with the specified
38 * message and root cause.
39 *
40 * @param msg the detail message
41 * @param t the root cause
42 */
43 public AuthenticationException(String msg, Throwable t) {
44 super(msg, t);
45 }
46
47 /***
48 * Constructs an <code>AuthenticationException</code> with the specified
49 * message and no root cause.
50 *
51 * @param msg the detail message
52 */
53 public AuthenticationException(String msg) {
54 super(msg);
55 }
56
57
58
59 public Authentication getAuthentication() {
60 return authentication;
61 }
62
63 void setAuthentication(Authentication authentication) {
64 this.authentication = authentication;
65 }
66 }