Commit ff5de0c6 authored by fangxinjiang's avatar fangxinjiang

鉴权-fxj

parent bbfe8a73
...@@ -41,7 +41,7 @@ public class WxLoginAuthenticationFilter extends AbstractAuthenticationProcessin ...@@ -41,7 +41,7 @@ public class WxLoginAuthenticationFilter extends AbstractAuthenticationProcessin
private WxConfig wxConfig; private WxConfig wxConfig;
public WxLoginAuthenticationFilter() { public WxLoginAuthenticationFilter() {
super(new AntPathRequestMatcher(SPRING_SECURITY_RESTFUL_LOGIN_URL, "POST")); super(new AntPathRequestMatcher(SPRING_SECURITY_RESTFUL_LOGIN_URL, "GET"));
} }
/** /**
* *
...@@ -54,7 +54,7 @@ public class WxLoginAuthenticationFilter extends AbstractAuthenticationProcessin ...@@ -54,7 +54,7 @@ public class WxLoginAuthenticationFilter extends AbstractAuthenticationProcessin
@Override @Override
public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException { public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException {
if (postOnly && !request.getMethod().equals("POST")) { if (!postOnly && !request.getMethod().equals("GET")) {
throw new AuthenticationServiceException( throw new AuthenticationServiceException(
"Authentication method not supported: " + request.getMethod()); "Authentication method not supported: " + request.getMethod());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment