npm.io
0.1.1 • Published 2 years ago

insomnia-plugin-sign-jws-payload

Licence
ISC
Version
0.1.1
Deps
1
Size
76 kB
Vulns
1
Weekly
0

Sign JWS payload

Convert request body into JWS using a private key.

Installation

From Insomnia Plugin Hub

  1. Navigate to https://insomnia.rest/plugins/insomnia-plugin-sign-jws-payload
  2. Click Install Plugin
  3. Click Open
  4. Once opened, click Install
From the Insomnia App
  1. Go to Application > Preferences or click the cog icon ()
  2. Navigate to the Plugins tab
  3. Enter insomnia-plugin-sign-jws-payload
  4. Click Install
Manual Install
  1. Using a terminal, cd into your Insomnia plugins folder - See Insomnia Docs
  2. Run git clone https://github.com/cobe529/insomnia-plugin-sign-jws-payload.git
Usage
  • In the requests, the private key that will be used for signing shall be added in a header named x-jws-private-key.
  • All line breaks in the private key shall be converted into '\n'. You can also add the private key in environment variables.
  • The JSON payload will be signed using ES256 algorithm.
  • The x-jws-private-key header will be removed before the API is sent.
  • The body should look like:
    Body
  • The header should look like:
    Header

Keywords