Skip to content
Branch: master
Go to file
Code

Latest commit

edgurgel committed 7018eb2 Oct 8, 2017
Update codebase to Elixir 1.5

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Signaturex Build Status

Simple key/secret based authentication for APIs (documentation).

Totally based on https://github.com/mloughran/signature

Usage

You will need Elixir ~> 1.5 and Erlang ~> 20.0

Client side:

params = %{ q: "asdaf" }
signed_params = Signaturex.sign("key", "secret", :put, "/some/path", params)
params = Map.merge(signed_params, params)
query_string = URI.encode_query(params)
HTTPsomething.put("/some/path?" <> query_string)

Server side:

Signaturex.validate("key", "secret", :put, "/some/path", params) # Will return true or false
You can’t perform that action at this time.