1.0.0 • Published 2 years ago

insomnia-plugin-jwt-cookie-auth-token v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Insomnia Plugin for Auth Cookies

insomnia-plugin-cookie-auth is a plugin that allows extracting a specific cookie containing an oauth2 authorization token (or something containing an access_token field). It will detect if the cookie or token has expired and make send the request to retrieve an updated cookie or token.

Usage

This isn't published on NPM, so it needs to be manually installed.

  1. Clone the repository to the Insomnia plugins folder
    e.g. cd <insomnia plugins folder>; git clone <url>
  2. Install the dependencies
    • npm: npm install
    • yarn: yarn install
  3. Build it
    • npm: npm run-script build
    • yarn: yarn build
      This should produce: index.js
  4. Open Insomnia or tell it to reload plugins
  5. There should be a new template tag called Cookie Auth Token
  6. Provided the necessary configuration
    • Request: This is the which request the plugin should make if the token or cookie has expired
    • Cookie Domain: This is the domain name that the cookie that set the cookie.
      This is required as it's possible to have multiple cookies named the same.
    • The name of the cookie that will contain the access token.