2

I am using nodeSSPI module to authenticate my node js application and it works fine as long as the request is from the browser but when I try to request i.e. GET,POST etc. from POST Man Client it always returns 401 Unauthorized

I dont fully understand the mechanics of nodeSSPI library but I would really appreciate it if anyone could point me in the right direction

The code is pretty straight forward to be honest.

var nodeSSPIObj = new nodeSSPI({authoritative: true, domain: 'XYZ'});
app.use(function(req, res, next) {
    nodeSSPIObj.authenticate(req, res, function(err) {if (!res.finished) {next()}})
})

Here is the link to the node-sspi package as I am not allowed to create a new tag on SO yet, I am posting the link to the module. Node SSPI

Nick Div
  • 5,338
  • 12
  • 65
  • 127

1 Answers1

0

Nick,

Use ARC, and create a new request as needed. Add a new Authorization header to the request, click the pencil icon on the right, and add your Windows credentials.

ARC will automatically Base64Encode your credentials, and amend Basic to the header. This worked for me as I had the same issue / set-up as you.

enter image description here

tim
  • 3,256
  • 3
  • 22
  • 13