模块 java.naming

类 AuthenticationException

所有已实现的接口:
Serializable

public class AuthenticationException extends NamingSecurityException
当访问命名或目录服务时发生身份验证错误时抛出此异常。身份验证错误可能会发生,例如,当用户程序提供的凭据无效或无法通过命名/目录服务对用户进行身份验证时。

如果程序想要特别处理这个异常,它应该在尝试捕获 NamingException 之前显式地捕获 AuthenticationException。捕获 AuthenticationException 后,程序可以通过使用适当的凭据更新已解析上下文的环境属性来重新尝试身份验证。

适用于 NamingException 的同步和序列化问题直接适用于此处。

自从:
1.3
参见:
  • 构造方法详细信息

    • AuthenticationException

      public AuthenticationException(String  explanation)
      使用提供的解释构造 AuthenticationException 的新实例。所有其他字段默认为空。
      参数:
      explanation - 一个可能为空的字符串,其中包含有关此异常的其他详细信息。
      参见:
    • AuthenticationException

      public AuthenticationException()
      构造 AuthenticationException 的新实例。所有字段都设置为空。