How is filled request.header.authorization?
Asked Answered
C

1

0

I'm passing from express to restify and I wrote a module to check my authorization that used express-session and before it worked well.

Now, on restify, the request.headers.authorization return undefined so my question is: can I add some code to tell to restify to fill this field?

Ceiling answered 27/10, 2016 at 14:56 Comment(3)
It should be request.headers.authorization. Do you know for sure that whatever client is calling your code actually supplies an authorization header?Griskin
@Griskin : you are right! However, what do you mean? If do I know that all calls will arrive from smartphone, for example? If it is correct, so I would create the api most flexible as possible so the answer is no.Ceiling
I have a doubt, who does fill the headers? My server api or client call?Ceiling
C
0

Ok, sorry for my illiteracy in autentication/authorization process! The problem was that I didn't send any headers on "authorization" request! Now it works without any new code.

Ceiling answered 28/10, 2016 at 9:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.