Skip to content

Commit

Permalink
Merge pull request #29950 from mkouba/issue-29919
Browse files Browse the repository at this point in the history
Websockets client - set the current security identity
  • Loading branch information
sberyozkin authored Dec 19, 2022
2 parents 4c7ca3b + 38e36ca commit 04d2bf7
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ public T call(C context, UndertowSession session) throws Exception {
boolean required = !requestContext.isActive();
if (required) {
requestContext.activate();
Principal p = session.getUserPrincipal();
if (p instanceof WebSocketPrincipal) {
var current = getCurrentIdentityAssociation();
if (current != null) {
current.setIdentity(((WebSocketPrincipal) p).getSecurityIdentity());
}
}
Principal p = session.getUserPrincipal();
if (p instanceof WebSocketPrincipal) {
var current = getCurrentIdentityAssociation();
if (current != null) {
current.setIdentity(((WebSocketPrincipal) p).getSecurityIdentity());
}
}
try {
Expand Down

0 comments on commit 04d2bf7

Please sign in to comment.