Similar to the option of the JS client:
```java
opts = new Socket.Options();
opts.extraHeaders = singletonMap("authorization", singletonList("bearer abcd"));
socket = new Socket(opts);
```
Note: the refactor of the options (similar to [1]) will be done in a
future step.
[1] 5f47a50ee5