mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-07 11:12:14 +00:00
Polish SecurityContextHolderStrategy Usage
- Add to HttpSessionSecurityContextRepository#saveContext Issue gh-11060
This commit is contained in:
parent
0c0e298aa7
commit
380a6a2564
@ -142,7 +142,7 @@ public class HttpSessionSecurityContextRepository implements SecurityContextRepo
|
|||||||
SaveContextOnUpdateOrErrorResponseWrapper.class);
|
SaveContextOnUpdateOrErrorResponseWrapper.class);
|
||||||
if (responseWrapper == null) {
|
if (responseWrapper == null) {
|
||||||
boolean httpSessionExists = request.getSession(false) != null;
|
boolean httpSessionExists = request.getSession(false) != null;
|
||||||
SecurityContext initialContext = SecurityContextHolder.createEmptyContext();
|
SecurityContext initialContext = this.securityContextHolderStrategy.createEmptyContext();
|
||||||
responseWrapper = new SaveToSessionResponseWrapper(response, request, httpSessionExists, initialContext);
|
responseWrapper = new SaveToSessionResponseWrapper(response, request, httpSessionExists, initialContext);
|
||||||
}
|
}
|
||||||
responseWrapper.saveContext(context);
|
responseWrapper.saveContext(context);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user