Authentication for api's

#1

Hi, I am trying to expose some endpoints (api) for this I want to add authentication, I can able to add bais auth by enabling httpNodeAuth in the settings.js file but I want to pass authorization(access_token) in the header which I usually get from auth/token this endpoint, how can do this?

0 Likes

#2

You want to send or receive information in the http headers?

If you wish to send see the cookbook. https://cookbook.nodered.org where there’s an example.

If you wish to receive they are included in the msg object. Add a debug node set to display complete message.

0 Likes

#3

@ukmoose I want to pass Authorization in header,

example: i have two apis localhost:1880/auth/token - here i am getting access_token, this token i want to pass as Authorization for localhost:1880/hello this get api

0 Likes