diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/server/standard/GlassFishRequestUpgradeStrategy.java b/spring-websocket/src/main/java/org/springframework/web/socket/server/standard/GlassFishRequestUpgradeStrategy.java index 4d0c628052..57ddd4366d 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/server/standard/GlassFishRequestUpgradeStrategy.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/server/standard/GlassFishRequestUpgradeStrategy.java @@ -165,6 +165,7 @@ public class GlassFishRequestUpgradeStrategy extends AbstractStandardUpgradeStra RequestContext wsRequest = RequestContext.Builder.create(). requestURI(URI.create(wsApp.getPath())).requestPath(wsApp.getPath()). + userPrincipal(request.getUserPrincipal()). connection(connection).secure(request.isSecure()).build(); for (String header : headers.keySet()) {