Skip to content

Commit 8a2b967

Browse files
Merge branch '5.8.x' into 6.0.x
2 parents 177514b + c75ee25 commit 8a2b967

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/modules/ROOT/pages/servlet/authentication/session-management.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public void login(@RequestBody LoginRequest loginRequest, HttpServletRequest req
157157
Authentication authentication = authenticationManager.authenticate(token); <4>
158158
SecurityContext context = securityContextHolderStrategy.createEmptyContext();
159159
context.setAuthentication(authentication); <5>
160-
securityContextHolderStrategy.setContext(authentication);
160+
securityContextHolderStrategy.setContext(context);
161161
securityContextRepository.saveContext(context, request, response); <6>
162162
}
163163
@@ -825,7 +825,7 @@ public class SomeClass {
825825
// ...
826826
SecurityContext context = this.securityContextHolderStrategy.createEmptyContext(); <1>
827827
context.setAuthentication(authentication); <2>
828-
this.securityContextHolderStrategy.setContext(authentication); <3>
828+
this.securityContextHolderStrategy.setContext(context); <3>
829829
}
830830
831831
}

0 commit comments

Comments
 (0)