JavaScript WebSocket API does not support adding authorization headers making the live console endpoint unusable. The only controllable header is Sec-WebSocket-Protocol, which is not convenient to use and support.
Modification/Result
Methods or parameter annotated with TokenAuth allows to either add the generated token as a bearer token or as a query parameter.
I made the decision to create a third annotation because this will still force a user to use the correct header if the endpoint won't upgrade to a websocket connection later on.
Motivation
JavaScript WebSocket API does not support adding authorization headers making the live console endpoint unusable. The only controllable header is
Sec-WebSocket-Protocol
, which is not convenient to use and support.Modification/Result
Methods or parameter annotated with TokenAuth allows to either add the generated token as a bearer token or as a query parameter.
I made the decision to create a third annotation because this will still force a user to use the correct header if the endpoint won't upgrade to a websocket connection later on.