01 /*
02 * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
03 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
04 *
05 * This code is free software; you can redistribute it and/or modify it
06 * under the terms of the GNU General Public License version 2 only, as
07 * published by the Free Software Foundation. Sun designates this
08 * particular file as subject to the "Classpath" exception as provided
09 * by Sun in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any questions.
24 */
25
26 package javax.security.sasl;
27
28 /**
29 * This exception is thrown by a SASL mechanism implementation
30 * to indicate that the SASL
31 * exchange has failed due to reasons related to authentication, such as
32 * an invalid identity, passphrase, or key.
33 * <p>
34 * Note that the lack of an AuthenticationException does not mean that
35 * the failure was not due to an authentication error. A SASL mechanism
36 * implementation might throw the more general SaslException instead of
37 * AuthenticationException if it is unable to determine the nature
38 * of the failure, or if does not want to disclose the nature of
39 * the failure, for example, due to security reasons.
40 *
41 * @since 1.5
42 *
43 * @author Rosanna Lee
44 * @author Rob Weltman
45 */
46 public class AuthenticationException extends SaslException {
47 /**
48 * Constructs a new instance of <tt>AuthenticationException</tt>.
49 * The root exception and the detailed message are null.
50 */
51 public AuthenticationException() {
52 super ();
53 }
54
55 /**
56 * Constructs a new instance of <tt>AuthenticationException</tt>
57 * with a detailed message.
58 * The root exception is null.
59 * @param detail A possibly null string containing details of the exception.
60 *
61 * @see java.lang.Throwable#getMessage
62 */
63 public AuthenticationException(String detail) {
64 super (detail);
65 }
66
67 /**
68 * Constructs a new instance of <tt>AuthenticationException</tt> with a detailed message
69 * and a root exception.
70 *
71 * @param detail A possibly null string containing details of the exception.
72 * @param ex A possibly null root exception that caused this exception.
73 *
74 * @see java.lang.Throwable#getMessage
75 * @see #getCause
76 */
77 public AuthenticationException(String detail, Throwable ex) {
78 super (detail, ex);
79 }
80
81 /** Use serialVersionUID from JSR 28 RI for interoperability */
82 private static final long serialVersionUID = -3579708765071815007L;
83 }
|