express-basic-auth icon indicating copy to clipboard operation
express-basic-auth copied to clipboard

Add the UTF-8 `charset` `auth-param`.

Open issuefiler opened this issue 2 years ago • 2 comments

https://github.com/LionC/express-basic-auth/blob/dd17b4de9fee9558269cdc583310bde5331456e7/index.js#L66-L75

Now that UTF-8 has become the de facto universal standard, I suggest adding the UTF-8 charset auth-param defined by RFC 7617, to the WWW-Authenticate header field value express-basic-auth produces.

WWW-Authenticate: Basic realm="real", charset="UTF-8"

issuefiler avatar Dec 03 '22 13:12 issuefiler

The comparison is already being performed in UTF-8.

https://github.com/LionC/express-basic-auth/blob/dd17b4de9fee9558269cdc583310bde5331456e7/index.js#L7-L17

issuefiler avatar Dec 03 '22 13:12 issuefiler

Will have to check if this change is 100% downwards compatible. Definitely a good suggestion, thank you!

LionC avatar Sep 28 '23 13:09 LionC