openapi-python-generator icon indicating copy to clipboard operation
openapi-python-generator copied to clipboard

Token Authorization header can have other names than 'Bearer'

Open nklamann opened this issue 1 year ago • 1 comments

Describe the bug Working against paperless-ngx I got 401 errors in all requests. It turned out that this software wants to read 'Token xxxxxxx' nstead of 'bearer xxxxx' in the header. See also https://docs.paperless-ngx.com/api/#authorization

Expected behavior The name of the Authorization header should be configurable. Additional context I did a search and replace in a lot of files and it works for now.

nklamann avatar Dec 19 '24 15:12 nklamann

I investigated further and I think that indeed Beareris the correct way. https://datatracker.ietf.org/doc/html/rfc6750#section-2.1 . and I raised a discussion over there .

Nevertheless : Out in the wild these things happen and for pragmatic reasons it would be useful to have an additional command line parameter --auth-header-name or similar.

nklamann avatar Dec 23 '24 07:12 nklamann