which support plan is this issue covered by? (e.g. Community, Core, Plus, or Enterprise): Community
is this issue currently blocking your project? (yes/no): no
is this issue affecting a production system? (yes/no): no
Context
node version: 10.17.0
module version with issue: 8.0.1
last module version without issue: Unknown
environment (e.g. node, browser, native): Node
used with (e.g. hapi application, another framework, standalone, ...): Standalone
any other relevant information:
-- The issue seems to be generated by this line of code in the @hapi/boom library.
-- One can work around the issue by passing an array value with a single string as the scheme argument of the unauthorized function. For example boom.unauthorized(null, ['Bearer']) produces the correct value.
What are you trying to achieve or the steps to reproduce?
I want to produce an unauthorized error where the WWW-Authenticate header's value is scheme that is specified at runtime. In the example below the string value 'Bearer'. Note that this string value has no spaces before or after it.
Support plan
Context
scheme
argument of the unauthorized function. For exampleboom.unauthorized(null, ['Bearer'])
produces the correct value.What are you trying to achieve or the steps to reproduce?
I want to produce an unauthorized error where the
WWW-Authenticate
header's value is scheme that is specified at runtime. In the example below the string value'Bearer'
. Note that this string value has no spaces before or after it.What was the result you got?
The error object's
WWW-Authenticate
property's value has an extra space at the end ('Bearer '
).What result did you expect?
The error object's
WWW-Authenticate
property's value should not have an extra space at the end ('Bearer'
).