草庐IT

clearAuthentication

全部标签

java - SecurityContextLogoutHandler 的 clearAuthentication 如何不是线程安全的?

Spring的SecurityContextLogoutHandler指出clearAuthentication标志用于:removestheAuthenticationfromtheSecurityContexttopreventissueswithconcurrentrequests.从SecurityContext中删除Authentication可以避免什么具体问题?为什么仅仅使session无效(这是SecurityContextLogoutHandler的另一职责)还不够?不清除SecurityContext是否担心SecurityContextPersistenceFil