1. /*
  2. * @(#)AuthenticationException.java 1.4 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.security.sasl;
  8. /**
  9. * This exception is thrown by a SASL mechanism implementation
  10. * to indicate that the SASL
  11. * exchange has failed due to reasons related to authentication, such as
  12. * an invalid identity, passphrase, or key.
  13. * <p>
  14. * Note that the lack of an AuthenticationException does not mean that
  15. * the failure was not due to an authentication error. A SASL mechanism
  16. * implementation might throw the more general SaslException instead of
  17. * AuthenticationException if it is unable to determine the nature
  18. * of the failure, or if does not want to disclose the nature of
  19. * the failure, for example, due to security reasons.
  20. *
  21. * @since 1.5
  22. *
  23. * @author Rosanna Lee
  24. * @author Rob Weltman
  25. */
  26. public class AuthenticationException extends SaslException {
  27. /**
  28. * Constructs a new instance of <tt>AuthenticationException</tt>.
  29. * The root exception and the detailed message are null.
  30. */
  31. public AuthenticationException () {
  32. super();
  33. }
  34. /**
  35. * Constructs a new instance of <tt>AuthenticationException</tt>
  36. * with a detailed message.
  37. * The root exception is null.
  38. * @param detail A possibly null string containing details of the exception.
  39. *
  40. * @see java.lang.Throwable#getMessage
  41. */
  42. public AuthenticationException (String detail) {
  43. super(detail);
  44. }
  45. /**
  46. * Constructs a new instance of <tt>AuthenticationException</tt> with a detailed message
  47. * and a root exception.
  48. *
  49. * @param detail A possibly null string containing details of the exception.
  50. * @param ex A possibly null root exception that caused this exception.
  51. *
  52. * @see java.lang.Throwable#getMessage
  53. * @see #getCause
  54. */
  55. public AuthenticationException (String detail, Throwable ex) {
  56. super(detail, ex);
  57. }
  58. /** Use serialVersionUID from JSR 28 RI for interoperability */
  59. private static final long serialVersionUID = -3579708765071815007L;
  60. }