如何通過調用Web Service覆蓋現有的Spring Security身份驗證,以及何時失敗,需要重定向某些第三方登錄頁面。覆蓋現有的Spring Security身份驗證
爲了調用這個認證Web服務,我需要得到一些ServletRequest參數和重定向,我需要訪問ServletResponse。
因此,我需要找出一些ServletRequest和ServletResponse參數的身份驗證方法。
但仍然沒有找到這樣的ProcessingFilter或AuthenticationProvider。
根據Spring安全基本,它似乎我必須重寫AuthenticationProvider相關的身份驗證方法。
根據使用的情況下,我必須實現Spring Security的預認證,
但問題是唯一具有認證參數PreAuthenticatedAuthenticationProvider相關的「身份驗證」的方法。
PreAuthenticatedAuthenticationProvider
public class PreAuthenticatedAuthenticationProvider implements
AuthenticationProvider, InitializingBean, Ordered {
public Authentication authenticate(Authentication authentication) {}
}
至於解決方案,是否有可能使用的AuthenticationFailureHandler自定義實現?
謝謝。