Path: blob/master/src/java.naming/share/classes/javax/naming/AuthenticationException.java
41152 views
/*1* Copyright (c) 1999, 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.naming;2627/**28* This exception is thrown when an authentication error occurs while29* accessing the naming or directory service.30* An authentication error can happen, for example, when the credentials31* supplied by the user program are invalid or otherwise fail to32* authenticate the user to the naming/directory service.33*<p>34* If the program wants to handle this exception in particular, it35* should catch AuthenticationException explicitly before attempting to36* catch NamingException. After catching AuthenticationException, the37* program could reattempt the authentication by updating38* the resolved context's environment properties with the appropriate39* credentials.40* <p>41* Synchronization and serialization issues that apply to NamingException42* apply directly here.43*44* @author Rosanna Lee45* @author Scott Seligman46* @since 1.347*/4849public class AuthenticationException extends NamingSecurityException {50/**51* Constructs a new instance of AuthenticationException using the52* explanation supplied. All other fields default to null.53*54* @param explanation A possibly null string containing55* additional detail about this exception.56* @see java.lang.Throwable#getMessage57*/58public AuthenticationException(String explanation) {59super(explanation);60}6162/**63* Constructs a new instance of AuthenticationException.64* All fields are set to null.65*/66public AuthenticationException() {67super();68}6970/**71* Use serialVersionUID from JNDI 1.1.1 for interoperability72*/73private static final long serialVersionUID = 3678497619904568096L;74}757677