Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zalando-stups/httpie-zign
Zign OAuth plugin for HTTPie
https://github.com/zalando-stups/httpie-zign
Last synced: 2 months ago
JSON representation
Zign OAuth plugin for HTTPie
- Host: GitHub
- URL: https://github.com/zalando-stups/httpie-zign
- Owner: zalando-stups
- License: other
- Created: 2015-07-10T18:34:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-14T14:18:10.000Z (about 9 years ago)
- Last Synced: 2024-11-04T08:36:15.606Z (3 months ago)
- Language: Python
- Homepage: https://pypi.python.org/pypi/httpie-zign
- Size: 3.91 KB
- Stars: 22
- Watchers: 14
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - zalando-stups/httpie-zign - Zign OAuth plugin for HTTPie (others)
README
===========
httpie-zign
===========STUPS Zign OAuth 2 plugin for the `HTTPie `_ command line HTTP client.
`Zign `_ is STUPS' command line client to generate OAuth2 access tokens.
Installation
------------.. code-block:: bash
$ 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:.. code-block:: bash
$ 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 scopesYou can list the created tokens using the Zign CLI:
.. code-block:: bash
$ zign li
You can set the default ``--auth-type=zign`` option in the ``~/.httpie/config.json`` file for convenience:
.. code-block:: bash
$ echo '{"default_options": ["--auth-type=zign"]}' > ~/.httpie/config.json
$ http -a mytok: https://example.org # that's much shorter now :-)