1. /*
  2. * @(#)AuthenticationException.java 1.7 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.naming;
  8. /**
  9. * This exception is thrown when an authentication error occurs while
  10. * accessing the naming or directory service.
  11. * An authentication error can happen, for example, when the credentials
  12. * supplied by the user program is invalid or otherwise fails to
  13. * authenticate the user to the naming/directory service.
  14. *<p>
  15. * If the program wants to handle this exception in particular, it
  16. * should catch AuthenticationException explicitly before attempting to
  17. * catch NamingException. After catching AuthenticationException, the
  18. * program could reattempt the authentication by updating
  19. * the resolved context's environment properties with the appropriate
  20. * appropriate credentials.
  21. * <p>
  22. * Synchronization and serialization issues that apply to NamingException
  23. * apply directly here.
  24. *
  25. * @author Rosanna Lee
  26. * @author Scott Seligman
  27. * @version 1.7 03/12/19
  28. * @since 1.3
  29. */
  30. public class AuthenticationException extends NamingSecurityException {
  31. /**
  32. * Constructs a new instance of AuthenticationException using the
  33. * explanation supplied. All other fields default to null.
  34. *
  35. * @param explanation A possibly null string containing
  36. * additional detail about this exception.
  37. * @see java.lang.Throwable#getMessage
  38. */
  39. public AuthenticationException(String explanation) {
  40. super(explanation);
  41. }
  42. /**
  43. * Constructs a new instance of AuthenticationException.
  44. * All fields are set to null.
  45. */
  46. public AuthenticationException() {
  47. super();
  48. }
  49. /**
  50. * Use serialVersionUID from JNDI 1.1.1 for interoperability
  51. */
  52. private static final long serialVersionUID = 3678497619904568096L;
  53. }