SPNEG(GSS negotiate)auth plugin for httpie.
httpie-negotiate的Python项目详细描述
spnego(gss negotiate)的HTTPie身份验证插件,基于jakub的httpie ntlm示例。
安装
$ pip install httpie-negotiate
现在应该可以在$ http --help输出中的--auth-type下看到negotiate。
用法
您需要有一个有效的kerberos主体,如有必要,请先运行kinit。
$ http --auth-type=negotiate --auth : https://example.org
默认情况下,kerberos相互身份验证是必需的,建议这样做。 如果您严格要求相互身份验证是可选的或已解散的,则可以使用HTTPIE_KERBEROS_MUTUAL环境变量。
$ HTTPIE_KERBEROS_MUTUAL=OPTIONAL http --auth-type=negotiate --auth : https://example.org $ HTTPIE_KERBEORS_MUTUAL=DISABLED http --auth-type=negotiate --auth : https://example.org
您也可以使用HTTPie sessions:
# Create session $ http --session=logged-in --auth-type=negotiate --auth : https://example.org # Re-use auth $ http --session=logged-in POST https://example.org hello=world