From c75ee25a6d5178c3ff8a44e6e8d52f6a4a8fa0b5 Mon Sep 17 00:00:00 2001 From: Bishakh Ghosh Date: Thu, 9 Mar 2023 20:54:44 +0530 Subject: [PATCH] Fix documentation code block bug Fixes #12850 --- .../ROOT/pages/servlet/authentication/session-management.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/modules/ROOT/pages/servlet/authentication/session-management.adoc b/docs/modules/ROOT/pages/servlet/authentication/session-management.adoc index 84c6b03678..1791e4be55 100644 --- a/docs/modules/ROOT/pages/servlet/authentication/session-management.adoc +++ b/docs/modules/ROOT/pages/servlet/authentication/session-management.adoc @@ -243,7 +243,7 @@ public void login(@RequestBody LoginRequest loginRequest, HttpServletRequest req Authentication authentication = authenticationManager.authenticate(token); <4> SecurityContext context = securityContextHolderStrategy.createEmptyContext(); context.setAuthentication(authentication); <5> - securityContextHolderStrategy.setContext(authentication); + securityContextHolderStrategy.setContext(context); securityContextRepository.saveContext(context, request, response); <6> } @@ -911,7 +911,7 @@ public class SomeClass { // ... SecurityContext context = this.securityContextHolderStrategy.createEmptyContext(); <1> context.setAuthentication(authentication); <2> - this.securityContextHolderStrategy.setContext(authentication); <3> + this.securityContextHolderStrategy.setContext(context); <3> } }