Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

An Insomnia REST client plugin to handle Ingenico GCS HMAC authorization

License

Notifications You must be signed in to change notification settings

flybondi/insomnia-plugin-gcs-hmac

Repository files navigation

@flybondi/insomnia-plugin-gcs-hmac

js-semistandard-style code style: prettier

Simple plugin to add Ingenico GCS HMAC authorization header template tag to Insomnia. Largely based based on insomnia-plugin-hash.

How to use

On a request to a GCS endpoint,

  • Create a Date header and set its value to any date following the RFC2822 (GMT) standard (e.g.: Wed, 16 Oct 2019 16:18:47 GMT).

💡 The correct pattern for an RFC2822 date is ddd, DD MMM YYYY HH:mm:ss [GMT] for moment and ddd, dd MMM yyy HH:mm:ss 'GMT' on date-fns.

  • Create a X-GCS-ServerMetaInfo header and set its value to the ServerMetaInfo information sent by GCS Connect SDK. This is an invariant, base64 encoded payload (i.e.: always the same value on a given environment). You can inspect this value from request logs (set enableLogging: true when initializing a connect-sdk-nodejs instance). Alternative, you can create it yourself - see here for understanding what it contains and how it can be built.
  • Create an Authorization header.
  • Use ^ + Space (or Ctrl + Space) to create a tag on the Authorization header value and select GCSHMAC.
  • Fill in requested plugin values.

Known issues

Due to a current Insomnia limitation, it is not possible for tag plugins to render other tags - this means that the value of Date cannot be set by another tag plugin, such as Timestamp and must be defined manually.


Made with 💛 by Flybondi.

About

An Insomnia REST client plugin to handle Ingenico GCS HMAC authorization

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •