ninigi / plug_hmouse Goto Github PK
View Code? Open in Web Editor NEWHMAC for Plug applications using Plug.Conn and Plug.Parsers
License: MIT License
HMAC for Plug applications using Plug.Conn and Plug.Parsers
License: MIT License
Firstly, thanks for releasing this repo, it's saved me a lot of work!
I'm working on a project that listens for GitHub webhooks and GitHub sends a HMAC digest with their requests. This HMAC is in a different form to what your library expects. From what I can see, plug_hmouse
as it stands expects a HMAC to come in the form:
header: base64_encoded_digest
Whereas GitHub uses the form:
header: algorithm=hex_encoded_digest
eg. X-Hub-Signature: sha1=7d38cdd689735b008b3c702edd92eea23791c5f6
I am currently putting together code that adds in options to plug_hmouse
to enable this and was wondering whether you'd like me to open a PR when I'm finished. My working branch is here.
The way I was tackling this was adding options for whether or not the header value needs to be split into algorithm and digest and for whether the digest is base 16 or base 64. I'm not sure this is the best way of going about it, and feedback would be welcome.
On my branch, I need to add tests for the new options and add them to the documentation, but after that I would be really happy to contribute back upstream. Let me know what you think!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.