此規則會標示下列來自的已淘汰方法 com.ibm.websphere.security.WSSecurityHelper 類別:
這些方法在傳統版 WebSphere Application Server 8.5 版中已淘汰,並可能在未來版本中移除。 它們在 Liberty上無法使用。
提供的功能 WSSecurityHelper.revokeSSOCookies(HttpServletRequest req, HttpServletResponse res) 取代為 Java Servlet-3.0 規格 logout() 方法。 Java Servlet-3.0 logout() 方法將執行所有工作 WSSecurityHelper.revokeSSOCookies(HttpServletRequest req, HttpServletResponse res) 執行以及執行其他狀態清除,例如使階段作業失效及清除安全 Subject 從執行緒。
在二進位掃描器中,自動修正程式會取代呼叫 revokeSSOCookies(HttpServletRequest req, HttpServletResponse res) with calls to the logout() 方法。 比方說,下列程式碼
會取代為
提供的功能 WSSecurityHelper.getLTPACookieFromSSOToken() 由新方法取代 com.ibm.websphere.security.web.WebSecurityHelper.getSSOCookieFromSSOToken(). 請注意,這個新方法是在類別中 com.ibm.websphere.security.web.WebSecurityHelper, 不 com.ibm.websphere.security.WSSecurityHelper. 此方法會從現行執行緒的主題中擷取 SSO 記號,且會從中建置 SSO Cookie,以用於下游的 Web 呼叫。
在二進位掃描器中,「自動修正程式」會取代對的呼叫 WSSecurityHelper.getLTPACookieFromSSOToken() with calls to the WebSecurityHelper.getSSOCookieFromSSOToken() 方法。 的 import 陳述式 com.ibm.websphere.security.web.WebSecurityHelper 已新增 (必要的話)。 比方說,下列程式碼
會取代為
請在 WebSphere Application Server Traditional 及 Liberty上使用相容的新方法。 另請注意,使用 logout() 和 getSSOCookieFromSSOToken() 使用中的方法,應用程式需要 WebSphere Application Server V8.0 或更新版本。
此規則具有自動化修正程式。 將自訂配置複製到應用程式建置檔以啟用它。
如需相關資訊,請參閱