1.0.14 • Published 3 years ago

node-red-contrib-msal-certauth v1.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

node-red-contrib-msal-certauth

Node RED node to authenticate using MSAL using a Certificate file.

Mainly based on Azure docs and samples

Installation via the Web-Interface

  1. Open the menu in the upper right corner
  2. Choose Manage Palette
  3. Under Install, search for: node-red-contrib-msal-certauth

Installation via the command line

  1. Navigate to your Node RED user directory, usally $HOME/.node-red. For further details see here: https://nodered.org/docs/user-guide/runtime/adding-nodes#installing-with-npm
  2. Run the following command:
npm install node-red-contrib-msal-certauth

Prerequisites

Already registered App on Azure Portal.

Usage

This node is using Certificate Method of msal
Enter:

  • Client ID : either as msg.clientId or via config, e.g. "12345678-1abc-xxxx-8906-000"
  • Tenant ID : either as msg.tenantId or via config, e.g. "34509348-0000-zzzz-8906-000"
  • Scope : either as msg.scope or via config, e.g. "api://sdfs6335-s463-0000-...."
  • Thumbprint : either as msg.thumbprint or via config, e.g. "00:1A:F6:39:CD:82:F0:...."
  • PrivateKey : either as msg.privateKey or via config by setting the relativ path to the *.pem File

Node can receive msg.clientId, msg.tenantId, msg.scope, msg.thumbprint, msg.privateKey object.

Node will send msal JWT as response object. The included accessToken can be use to trigger http node to do REST call on Azure API. Example:

msg.msalToken: "eyJ0eXAiOiJKV1QiLCJhbGxx...."

Unit-Testing /Test JWT

  • Install node via npm i node-red-contrib-msal-certauth
  • Set the proper clientId, tenantId in the config.json file.
  • Run npm test
  • Respone should be a JWT.
1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago