From: Iuri de A. S. <iu...@iu...> - 2020-11-21 17:50:37
|
Hello Maksym, One can add any custom variable (i.e. Authorization “Bearer …") in the response headers as in: … set headers [ns_set new] ns_set put $headers "Authorization" "Bearer $token" … ns_respond -status $status -type "application/json" -headers $headers -string $response ad_script_abort That chunk is part of a JWT/login authentication API method. However, that’s very basic, and probably I haven’t understood the actual problem that you are facing. Let us know, Best wishes, I > On Rab. II 6, 1442 AH, at 13:59, Maksym Zinchenko <siq...@gm...> wrote: > > Hello, hope you are doing well. > I have a little question. Maybe a bug, would be so kind to help me out. > According to documentation [ns_conn auth] should return all authorization headers as a ns_set. > It works fine when using "Basic Authentication scheme", i've seen in the source code it should work with "Digest" > But when im trying to use "Bearer Authentication scheme" or "Custom" it returns empty ns_set, but i can see Authentication part in [ns_conn headers]. > > P.S. > Im using https://reqbin.com/ <https://reqbin.com/> to test my API request. > > Thank you > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel |