-
Notifications
You must be signed in to change notification settings - Fork 812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
非spring boot项目整合SSO #66
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1.将XxlSsoWebFilter.java 放入项目中
`package com.xxl.sso.core.filter;
import com.xxl.sso.core.conf.Conf;
import com.xxl.sso.core.login.SsoWebLoginHelper;
import com.xxl.sso.core.path.impl.AntPathMatcher;
import com.xxl.sso.core.user.XxlSsoUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.*;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
web sso filter
@author xuxueli 2018-04-03
*/
public class XxlSsoWebFilter extends HttpServlet implements Filter {
private static Logger logger = LoggerFactory.getLogger(XxlSsoWebFilter.class);
private static final AntPathMatcher antPathMatcher = new AntPathMatcher();
private String ssoServer;
private String logoutPath;
private String excludedPaths;
@OverRide
public void init(FilterConfig filterConfig) throws ServletException {
}
@OverRide
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest req = (HttpServletRequest) request;
HttpServletResponse res = (HttpServletResponse) response;
}
}
`
2.web.xml加入配置
XxlSsoWebFilter
com.it.config.XxlSsoWebFilter
sso_server
http://你的IP:端口/xxl-sso-server
SSO_LOGOUT_PATH
/logout
SSO_EXCLUDED_PATHS
XxlSsoWebFilter
/*
The text was updated successfully, but these errors were encountered: