requests-kerberos-0.12.0\requests_kerberos\kerberos_.py
Different types of mutual authentication:
with mutual_authentication set to REQUIRED, all responses will be authenticated with the exception of errors. Errors will have their contents and headers stripped. If a non-error response cannot be authenticated, a MutualAuthenticationError exception will be raised.
with mutual_authentication set to OPTIONAL, mutual authentication will be attempted if supported, and if supported and failed, a MutualAuthenticationError exception will be raised. Responses which do not support mutual authentication will be returned directly to the user.
with mutual_authentication set to DISABLED, mutual authentication will not be attempted, even if supported.
不同类型的相互认证:
如果将mutual_authentication设置为REQUIRED,则除错误外,所有响应都将被验证。错误的内容和标题将被删除。如果无法验证非错误响应,将引发MutualAuthenticationError异常。
如果mutual_authentication设置为OPTIONAL,如果支持,将尝试相互身份验证,如果支持且失败,将引发MutualAuthenticationError异常。不支持相互身份验证的响应将直接返回给用户。
如果mutual_authentication设置为DISABLED,即使支持互认证,也不会尝试。