Zign OAuth 2 plugin for HTTPie.
Project description
STUPS Zign OAuth 2 plugin for the HTTPie command line HTTP client.
Zign is STUPS’ command line client to generate OAuth2 access tokens.
Installation
$ pip install httpie-zign
You should now see zign under --auth-type in $ http --help output.
Usage
This plugin takes the Zign token name as the --auth username. The --auth password is used to specify to OAuth scopes. A named Zign OAuth 2 token is created and used with the specified scopes:
$ 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
You can list the created tokens using the Zign CLI:
$ zign li
You can set the default --auth-type=zign option in the ~/.httpie/config.json file for convenience:
$ echo '{"default_options": ["--auth-type=zign"]}' > ~/.httpie/config.json
$ http -a mytok: https://example.org # that's much shorter now :-)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file httpie-zign-0.2.tar.gz
.
File metadata
- Download URL: httpie-zign-0.2.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5aaa7ec66933c05ce71b2f85777cfb946e716845ea4047e861f47843cfd82163 |
|
MD5 | 5338aaff590235af14cde82c8cd5a695 |
|
BLAKE2b-256 | 295042641376b370f97825002833ee54e98cd360a244af9ea335d443b353845e |
File details
Details for the file httpie_zign-0.2-py3-none-any.whl
.
File metadata
- Download URL: httpie_zign-0.2-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 308e787ff0d51ac8b836d64714713c599d8e5ae608c259874edfa490675cd356 |
|
MD5 | fce7bcedeaaf2ddc494efb70314efff6 |
|
BLAKE2b-256 | 2f388a9424d2da9a819020470936bb4686d6a6c3558b694bd20aed5dd9c5439e |