Skip to content

Commit c75ee25

Browse files
ghoshbishakhmarcusdacoregio
authored andcommitted
Fix documentation code block bug
Fixes #12850
1 parent 8d664bc commit c75ee25

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
@@ -243,7 +243,7 @@ public void login(@RequestBody LoginRequest loginRequest, HttpServletRequest req
243243
Authentication authentication = authenticationManager.authenticate(token); <4>
244244
SecurityContext context = securityContextHolderStrategy.createEmptyContext();
245245
context.setAuthentication(authentication); <5>
246-
securityContextHolderStrategy.setContext(authentication);
246+
securityContextHolderStrategy.setContext(context);
247247
securityContextRepository.saveContext(context, request, response); <6>
248248
}
249249
@@ -911,7 +911,7 @@ public class SomeClass {
911911
// ...
912912
SecurityContext context = this.securityContextHolderStrategy.createEmptyContext(); <1>
913913
context.setAuthentication(authentication); <2>
914-
this.securityContextHolderStrategy.setContext(authentication); <3>
914+
this.securityContextHolderStrategy.setContext(context); <3>
915915
}
916916
917917
}

0 commit comments

Comments
 (0)