Look at "Authorization: Basic d2lraTpwZWRpYQ==" it is just two tokens,
but the content is decoded and returned in the ns_set a user and
password. Here is an example of the digest authorization header
Authorization: Digest username="Mufasa",
realm="testre...@host.com",
Gustaf, thank you very much.
You are amazing as always.
I thought "Authorization" is always kind of key -> pair values, guess I was
wrong.
I think most of them are so.
Thank you.
On Sat, Nov 21, 2020 at 7:05 PM Gustaf Neumann wrote:
> Dear Maksym,
>
> [ns_conn auth] handles Digest authenticati
There we go! ;)
> On Rab. II 6, 1442 AH, at 17:05, Gustaf Neumann wrote:
>
> Dear Maksym,
>
> [ns_conn auth] handles Digest authentication (i've never used it), but
> "Bearer" is not handled.
> The fields in the "Authorization" request header field are not always
> structured the same way,
Hi Maksym,
Indeed I got it now. And I’m able to replicate your scenario on my end.
Unless there's a bug (i.e. malformed list in the ns_auth assignment), it seems
ns_set supports only reserved keys for “auth”. So, I believe it’s because NS
source only assigns default values (basic headers to it)
Dear Maksym,
[ns_conn auth] handles Digest authentication (i've never used it), but
"Bearer" is not handled.
The fields in the "Authorization" request header field are not always
structured the same way,
so NaviServer tries it interprete it based on the first word. The known
types are enumerat
Hello Iuri, I think you misunderstood my question.
My problem is not to set but to get "ns_set"
I'm using this:
https://naviserver.sourceforge.io/n/naviserver/files/ns_conn.html#4
When client sends request to my server i want to get authentication method
using [ *ns_conn auth* ]
Here is simple e
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
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