2017 © Pedro Peláez
 

library hmac-auth

HMAC authentication for Tokenly APIs

image

tokenly/hmac-auth

HMAC authentication for Tokenly APIs

  • Wednesday, November 8, 2017
  • by dweller
  • Repository
  • 3 Watchers
  • 1 Stars
  • 12,982 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 13 Versions
  • 11 % Grown

The README.md

Overview

The HMAC authentication component for Tokenly., (*1)

Build Status, (*2)

Authentication

To authenticate HTTP requests that use this component, you must include 3 HTTP headers with your request:, (*3)

  1. X-Tokenly-Auth-Api-Token
  2. X-Tokenly-Auth-Nonce
  3. X-Tokenly-Auth-Signature

To generate these headers, you will need an API Token and a secret API Key., (*4)

Say my API Token is TWKTkwIQDTvirh6D and my API Secret key is Kun2M2UladalYAeUvXyiKWhFuwrsmSreM841K45O. Here is an explanation of each header., (*5)

X-Tokenly-Auth-Api-Token

This token is nothing more than the API Token., (*6)

Example: X-Tokenly-Auth-Api-Token: TWKTkwIQDTvirh6D, (*7)

X-Tokenly-Auth-Nonce

The nonce header is the current unix timestamp in seconds., (*8)

Example: X-Tokenly-Auth-Nonce: 1457530047, (*9)

X-Tokenly-Auth-Signature

The signature is a base64 encoded string using sha256 HMAC. The key for the hash is the API Key. And the message is generated using the following data:, (*10)

{METHOD}\n
{URL}\n
{PARAMETERS}\n
{API TOKEN}\n
{NONCE}

{METHOD} is the http method such as GET,POST,PUT,DELETE {URL} is the full URL of the api endpoint {PARAMETERS} are required and should be a JSON encoded string representing the parameters. For empty parameters, use {}. {API TOKEN} and {NONCE} are the same as send in the headers., (*11)

Items are separated with a single newline character., (*12)

After calculating the HMAC, encode the data in base64 format., (*13)

Example:, (*14)

Using the values above and a request of GET https://www.example.com/api/v1/mystuff, the signature header will be:, (*15)

X-Tokenly-Auth-Signature: hZ6SDgcZzo5AYrS9yopEQo068ax0NojG/CfXWG+RJEA, (*16)

The Versions

08/11 2017

dev-master

9999999-dev

HMAC authentication for Tokenly APIs

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

08/11 2017

v1.2.0

1.2.0.0

HMAC authentication for Tokenly APIs

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

29/10 2016

v1.1.2

1.1.2.0

HMAC authentication for Tokenly APIs

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

18/05 2016

v1.1.1

1.1.1.0

HMAC authentication for Tokenly APIs

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

18/05 2016

v1.1.0

1.1.0.0

HMAC authentication for Tokenly APIs

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

12/05 2016

v1.0.4

1.0.4.0

HMAC authentication for Tokenly APIs

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

16/04 2016

v1.0.3

1.0.3.0

HMAC authentication for Tokenly APIs

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

16/04 2016

v1.0.2

1.0.2.0

HMAC authentication for Tokenly APIs

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

12/02 2016

v0.2.2

0.2.2.0

A library for HMAC authentication

  Sources   Download

MIT

The Requires

 

The Development Requires

11/02 2016

v0.2.1

0.2.1.0

A library for HMAC authentication

  Sources   Download

MIT

The Requires

 

The Development Requires

11/02 2016

v0.2.0

0.2.0.0

A library for HMAC authentication

  Sources   Download

MIT

The Requires

 

The Development Requires

30/07 2015

0.1.x-dev

0.1.9999999.9999999-dev

A library for HMAC authentication

  Sources   Download

MIT

The Requires

 

The Development Requires

30/07 2015

v0.1.0

0.1.0.0

A library for HMAC authentication

  Sources   Download

MIT

The Requires

 

The Development Requires