Package io.goobi.viewer.websockets
Class GetHttpSessionConfigurator
java.lang.Object
jakarta.websocket.server.ServerEndpointConfig.Configurator
io.goobi.viewer.websockets.GetHttpSessionConfigurator
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.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidmodifyHandshake(ServerEndpointConfig config, HandshakeRequest request, HandshakeResponse response) Methods inherited from class jakarta.websocket.server.ServerEndpointConfig.Configurator
checkOrigin, getContainerDefaultConfigurator, getEndpointInstance, getNegotiatedExtensions, getNegotiatedSubprotocol
-
Constructor Details
-
GetHttpSessionConfigurator
public GetHttpSessionConfigurator()
-
-
Method Details
-
modifyHandshake
public void modifyHandshake(ServerEndpointConfig config, HandshakeRequest request, HandshakeResponse response) - Overrides:
modifyHandshakein classServerEndpointConfig.Configurator
-