1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.acegisecurity;
17
18 /***
19 * Thrown if an authentication request is rejected because the credentials are
20 * invalid. For this exception to be thrown, it means the account is neither
21 * locked nor disabled.
22 *
23 * @author Ben Alex
24 * @version $Id: BadCredentialsException.java,v 1.4 2005/11/17 00:55:49 benalex Exp $
25 */
26 public class BadCredentialsException extends AuthenticationException {
27
28
29 private Object extraInformation;
30
31
32
33 /***
34 * Constructs a <code>BadCredentialsException</code> with the specified
35 * message.
36 *
37 * @param msg the detail message
38 */
39 public BadCredentialsException(String msg) {
40 super(msg);
41 }
42
43 public BadCredentialsException(String msg, Object extraInformation) {
44 super(msg);
45 this.extraInformation = extraInformation;
46 }
47
48 /***
49 * Constructs a <code>BadCredentialsException</code> with the specified
50 * message and root cause.
51 *
52 * @param msg the detail message
53 * @param t root cause
54 */
55 public BadCredentialsException(String msg, Throwable t) {
56 super(msg, t);
57 }
58
59
60
61 /***
62 * Any additional information about the exception. Generally a
63 * <code>UserDetails</code> object.
64 *
65 * @return extra information or <code>null</code>
66 */
67 public Object getExtraInformation() {
68 return extraInformation;
69 }
70 }