Class GetHttpSessionConfigurator

java.lang.Object
jakarta.websocket.server.ServerEndpointConfig.Configurator
io.goobi.viewer.websockets.GetHttpSessionConfigurator

public class GetHttpSessionConfigurator extends ServerEndpointConfig.Configurator
Custom configurator that exposes the HTTP session and the Origin request header to web socket endpoints. The captured values are stashed in EndpointConfig.getUserProperties() under the keys HttpSession.class.getName() and WebSocketTools.ORIGIN_PROPERTY respectively, so endpoints can run the auth and origin guard from WebSocketTools on every handshake.