digitalbazaar / http-signature-header

BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Add bin #8

Closed aljones15 closed 5 years ago

aljones15 commented 5 years ago

adds a binary that is testable.

binary exposes the following methods:

cl14n maps to the signature string creation function sign maps to a custom sign function verify maps to an error (it will map to a valid verify method in the future).

collier: I added you because you work on this repo a lot primary reason for this PR is so Manu can see work so far.

uses this to parse http-messages: https://www.npmjs.com/package/http-message-parser

p.s. this PR is just to start the the binary and the only method expected to work is canonize aka c14n.

Major things to look for is:

  1. is the abstraction correct i.e. does each function have all the parameters it needs?
  2. how do you think we should be testing http-signatures?

The spec is here: https://w3c-dvcg.github.io/http-signatures/

aljones15 commented 5 years ago

@msporny ok all changes made except that one variable name. issue. also please check the error messages to make sure they are as verbose as you expect them to be.

dmitrizagidulin commented 5 years ago

👍