Open philcolol opened 4 years ago
@philcolol Is this header visible to the @ServerEndpoint
? I thought the HTTP headers were not available in the web socket channel, CC @stuartwdouglas
This definitely won't work at the moment, but in theory it should be possible to make it work.
Agreed. The MP REST Client spec only details propagating headers from an incoming JAX-RS request.
Has this been resolved? any workarounds?
We are using 'org.eclipse.microprofile.rest.client.propagateHeaders' property together with @RegisterClientHeaders annotation to propogate Authorization header to RestClients. It works when rest client called from Rest endpoints but fails with 401 when called from Webcosket endpoints. Is there some other configuration or well-known way to fix this?
To Reproduce Consider RestClient for some external service:
A websocket endpoint that calls it:
And a request
Configuration
Environment (please complete the following information):
uname -a
orver
: Microsoft Windows [Version 10.0.18363.1016]java -version
: openjdk version "1.8.0_212-release" OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4) OpenJDK 64-Bit Server VM (build 25.212-b4, mixed mode)mvnw --version
orgradlew --version
): Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: C:...\apache-maven-3.6.3 Java version: 1.8.0_192, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_192\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"