Module java.naming
Package javax.naming

Class AuthenticationNotSupportedException

所有已实现的接口:
Serializable

public class AuthenticationNotSupportedException extends NamingSecurityException
当请求的特定认证方式不受支持时,将抛出此异常。例如,如果程序尝试使用强认证,但目录/命名仅支持简单认证,则会抛出此异常。特定认证方式的识别是由提供程序和服务器特定的。可以使用特定的认证方案来指定,例如使用SASL标识的认证方案,或者使用通用认证说明符(例如"simple"和"strong")。

如果程序希望特别处理此异常,在尝试捕获NamingException之前,应明确捕获AuthenticationNotSupportedException。在捕获AuthenticationNotSupportedException后,程序可以通过相应地更新已解析上下文的环境属性,使用不同的认证方式重新尝试认证。

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

自 JDK 版本:
1.3
参见:
  • Constructor Details

    • AuthenticationNotSupportedException

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

      public AuthenticationNotSupportedException()
      使用所有名称解析字段和解释初始化为null构造AuthenticationNotSupportedException的新实例。