Skip to content

Latest commit

 

History

History
47 lines (27 loc) · 1.05 KB

README.rst

File metadata and controls

47 lines (27 loc) · 1.05 KB

httpie-token-auth

Access Token auth plugin for HTTPie.

Provides generic support for presenting access tokens of any type as long as they can be added to the Authorization header in the below format:

Authorization: <token_type> <token>

Installation

$ pip install git+https://github.com/satterly/httpie-token-auth.git

You should now see token under --auth-type in $ http --help output.

Usage

$ http --auth-type=token --auth='<token_type>:<token>' example.org

Examples

To access a protected resource with a "bearer" token:

$ http --auth-type=token --auth="Bearer:mF_9.B5f-4.1JqM" example.org

To access a protected resource with a "mac" token:

$ http --auth-type=token --auth='MAC:token="h480djs93hd8"' example.org

License

Copyright (c) 2016 Nick Satterly. Available under the MIT License.