mirror of https://gitee.com/topiam/eiam
⚡ 优化会话ID获取
parent
e75606c011
commit
6b29f9c3dd
|
@ -57,8 +57,7 @@ public class CasIdpConfigurer<B extends HttpSecurityBuilder<B>>
|
||||||
DocumentBuilder documentBuilder = getDocumentBuilder(http);
|
DocumentBuilder documentBuilder = getDocumentBuilder(http);
|
||||||
//CAS 登陆过滤器
|
//CAS 登陆过滤器
|
||||||
http.addFilterAfter(new CasIdpSingleSignOnEndpointFilter(applicationServiceLoader,
|
http.addFilterAfter(new CasIdpSingleSignOnEndpointFilter(applicationServiceLoader,
|
||||||
sessionRegistry, centralAuthenticationService),
|
centralAuthenticationService), UsernamePasswordAuthenticationFilter.class);
|
||||||
UsernamePasswordAuthenticationFilter.class);
|
|
||||||
|
|
||||||
//cas 验证过滤器
|
//cas 验证过滤器
|
||||||
http.addFilterBefore(
|
http.addFilterBefore(
|
||||||
|
|
|
@ -30,7 +30,6 @@ import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.boot.web.servlet.filter.OrderedFilter;
|
import org.springframework.boot.web.servlet.filter.OrderedFilter;
|
||||||
import org.springframework.core.Ordered;
|
import org.springframework.core.Ordered;
|
||||||
import org.springframework.http.HttpMethod;
|
import org.springframework.http.HttpMethod;
|
||||||
import org.springframework.security.core.session.SessionRegistry;
|
|
||||||
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
||||||
import org.springframework.security.web.util.matcher.RequestMatcher;
|
import org.springframework.security.web.util.matcher.RequestMatcher;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
@ -76,15 +75,11 @@ public class CasIdpSingleSignOnEndpointFilter extends OncePerRequestFilter
|
||||||
*/
|
*/
|
||||||
private final ApplicationServiceLoader applicationServiceLoader;
|
private final ApplicationServiceLoader applicationServiceLoader;
|
||||||
|
|
||||||
private final SessionRegistry sessionRegistry;
|
|
||||||
|
|
||||||
private final CentralAuthenticationService centralAuthenticationService;
|
private final CentralAuthenticationService centralAuthenticationService;
|
||||||
|
|
||||||
public CasIdpSingleSignOnEndpointFilter(ApplicationServiceLoader applicationServiceLoader,
|
public CasIdpSingleSignOnEndpointFilter(ApplicationServiceLoader applicationServiceLoader,
|
||||||
SessionRegistry sessionRegistry,
|
|
||||||
CentralAuthenticationService centralAuthenticationService) {
|
CentralAuthenticationService centralAuthenticationService) {
|
||||||
this.applicationServiceLoader = applicationServiceLoader;
|
this.applicationServiceLoader = applicationServiceLoader;
|
||||||
this.sessionRegistry = sessionRegistry;
|
|
||||||
this.centralAuthenticationService = centralAuthenticationService;
|
this.centralAuthenticationService = centralAuthenticationService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue