Giter Club home page Giter Club logo

httpie-hmac-auth's Introduction

httpie-hmac-auth

HMAC auth plugin for HTTPie.

HTTP requests will be signed with a shared secret key using HMAC. The string to sign format is:

<Method>\n
<Content-MD5>\n
<Content-Type>\n
<Date>\n
<URL>

Example String-to-sign

POST
vVqHE1k/uBRCoWe0FAh95g==
application/json
Tue, 12 Jan 2016 14:57:28 GMT
/api/v1/avatars

Example Authorization Header with HMAC signature

Authorization: HMAC XH+v0qhV4i/89y/DT2OOJx9Kjf3f/0j+w2aGZk625nU=

Installation

$ pip install httpie-hmac-auth

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

Usage

$ http --auth-type=hmac --auth='client:secret' example.org

Examples

To authenticate a client request when an access key is required by the server to lookup the shared secret:

$ http --auth-type=hmac --auth="client:secret" example.org

To authenticate a client request when there is no requirement for a client to supply an access key:

$ http --auth-type=hmac --auth=":secret" example.org

License

Copyright (c) 2016 The Guardian. Available under the MIT License.

httpie-hmac-auth's People

Contributors

cdjones32 avatar pg avatar satterly avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.