Path: blob/master/src/java.security.sasl/share/classes/javax/security/sasl/AuthenticationException.java
41159 views
/*1* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.security.sasl;2627/**28* This exception is thrown by a SASL mechanism implementation29* to indicate that the SASL30* exchange has failed due to reasons related to authentication, such as31* an invalid identity, passphrase, or key.32* <p>33* Note that the lack of an AuthenticationException does not mean that34* the failure was not due to an authentication error. A SASL mechanism35* implementation might throw the more general SaslException instead of36* AuthenticationException if it is unable to determine the nature37* of the failure, or if does not want to disclose the nature of38* the failure, for example, due to security reasons.39*40* @since 1.541*42* @author Rosanna Lee43* @author Rob Weltman44*/45public class AuthenticationException extends SaslException {46/**47* Constructs a new instance of {@code AuthenticationException}.48* The root exception and the detailed message are null.49*/50public AuthenticationException () {51super();52}5354/**55* Constructs a new instance of {@code AuthenticationException}56* with a detailed message.57* The root exception is null.58* @param detail A possibly null string containing details of the exception.59*60* @see java.lang.Throwable#getMessage61*/62public AuthenticationException (String detail) {63super(detail);64}6566/**67* Constructs a new instance of {@code AuthenticationException} with a detailed message68* and a root exception.69*70* @param detail A possibly null string containing details of the exception.71* @param ex A possibly null root exception that caused this exception.72*73* @see java.lang.Throwable#getMessage74* @see #getCause75*/76public AuthenticationException (String detail, Throwable ex) {77super(detail, ex);78}7980/** Use serialVersionUID from JSR 28 RI for interoperability */81private static final long serialVersionUID = -3579708765071815007L;82}838485