Code snippets repository to facilitate integration with Hive Services using JWT
Note
The snippets shown are a collection of necessary steps that need to be done to get authenticated by Hive
Warning
Requires Node version >= 18
Important
Prerequisite for using the code snippets - having received a partner ID and partner API token from Hive
Install dependencies:
npm install
Create a private RSA key that will be used to encode the Json Web Token:
npm run generate-rsa-key
Alternatively you can also generate a key via openssl
- see command:
npm run generate-rsa-key:openssl
Publish the public RSA key that will be used by Hive to decode the JWT:
npm run public-key-post
Create a JWT with manifest:
npm run create-jwt:manifest
Or create a JWT with regex:
npm run create-jwt:regex
Scripts available for public RSA key management.
Publish key:
npm run public-key-post
Fetch key:
npm run public-key-get
List all stored keys:
npm run public-key-get-all
Delete (invalidate) key:
npm run public-key-delete