Module bus.http

Interface Authenticator

All Known Implementing Classes:
NetAuthenticator

public interface Authenticator
在连接到代理服务器之前执行抢占式身份验证, 或者在收到来自源web服务器或代理服务器的挑战后执行被动身份验证. 代理身份验证器可以实现抢占式身份验证、反应式身份验证或两者都实现. 应用程序可以为源服务器或代理服务器配置Httpd的身份验证器,或者两者都配置.
Since:
Java 17+
Author:
Kimi Liu
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Authenticator
    不知道任何凭据且不尝试进行身份验证的验证程序
  • Method Summary

    Modifier and Type
    Method
    Description
    authenticate(Route route, Response response)
    该请求包含满足response中的身份验证挑战的凭据。
  • Field Details

    • NONE

      static final Authenticator NONE
      不知道任何凭据且不尝试进行身份验证的验证程序
  • Method Details

    • authenticate

      Request authenticate(Route route, Response response) throws IOException
      该请求包含满足response中的身份验证挑战的凭据。如果无法满足挑战,则返回null 该路线是最好的努力,它目前可能不总是提供,即使在逻辑上可用 在应用程序拦截器中手动重用身份验证器时,例如在实现特定于客户机的重试时,也可能不提供此功能
      Parameters:
      route - 路由信息
      response - 响应体
      Returns:
      返回一个请求
      Throws:
      IOException - 异常信息