npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

insomnia-plugin-request-body-hmac

v1.0.14

Published

Insomnia template tag for HMAC signature of value or request body

Downloads

977

Readme

Insomnia template tag for HMAC signature of message or request body

Based on the Template tag for hashing and also the HMAC template tag plugin published to NPM.

For the nice rest client Insomnia.

Install by going to the plugins tab in Insomnia and search for insomia-plugin-request-body-hmac or go to https://insomnia.rest/plugins/insomnia-plugin-request-body-hmac and click the Install Plugin button.

Main feature is being able to generate HMAC signatures using a key and a message and placing this into the request with the possibility of using the request body or parts of it as the message.

The signature can be inserted into any place where Insomnia accepts template tags like the url, request parameters, headers, and request body itself. Inserting it into the request body should only be used when selecting a different portion of the request body using a JSONPath since the result otherwise probably will not be what you expect due to the recursion.

Has an option of removing whitespace from a JSON request body before calculating the signature.

Allows you to create multiple different HMAC signatures with different options in the same request, previous versions only supported a single HMAC generated for each request.

Examples

Add the tag by pushing Ctrl + Space and search for Request body HMAC, you will see several variants for the different hash functions used. You can change the hash function used later as well.

Clicking the tag allows you to change the settings for the tag. It is for instance in here you will enter the key used. The Live Preview at the bottom contains a temporary value that will be replaced later unless you input a message in the field above it. The hex string in paranthesis, if you wonder why that is there, contains the settings that will be used to create the signature.

jsonpath-plus is used to navigate the request content to select the message to use instead of the complete body if needed. Please look at the linked project for more details about the syntax, but basically you can use $ to indicate the root object and then navigate down through objects separating each field by dots.

However, most uses will probably put these signatures in headers.

Any uses in the body will be generated first so this could be used to do multiple levels of signatures for those special APIs you might encounter. But multiple signatures wrapping eachother in the body will break unless you are very lucky.