跳转到主要内容

Zign OAuth 2插件用于HTTPie。

项目描述

STUPS Zign OAuth 2插件用于HTTPie命令行HTTP客户端。

Zign是STUPS的命令行客户端,用于生成OAuth2访问令牌。

安装

$ pip install httpie-zign

现在你应该能在 $ http --help 输出的 --auth-type 下看到 zign

用法

此插件将Zign令牌名称用作 --auth 用户名。 --auth 密码用于指定OAuth作用域。创建并使用指定作用域的命名Zign OAuth 2令牌。

$ http --auth-type=zign --auth=mytok:myscope https://example.org
$ http --auth-type=zign -a mytok:myscope1,scope2 https://example.org
$ http --auth-type=zign -a mytok: https://example.org  # use default scopes

您可以使用Zign CLI列出创建的令牌

$ zign li

您可以在 ~/.httpie/config.json 文件中将默认 --auth-type=zign 选项设置为方便使用

$ echo '{"default_options": ["--auth-type=zign"]}' > ~/.httpie/config.json
$ http -a mytok: https://example.org # that's much shorter now :-)

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分布

httpie-zign-0.2.tar.gz (2.3 kB 查看哈希值)

上传时间 源代码

构建分布

httpie_zign-0.2-py3-none-any.whl (7.2 kB 查看哈希值)

上传时间 Python 3

支持