CeDo
2021-05-10 0b69a024c3374419bcc9320f203cbb332c946daa
bugfixed
4个文件已修改
11 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/config/AppletWebSecurityConfigurationAdapter.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/config/SpringSecurityConfig.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/AppletAuthenticationFilter.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/resources/bootstrap.yml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/config/AppletWebSecurityConfigurationAdapter.java
@@ -22,7 +22,7 @@
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.antMatcher("/api/applets/**").authorizeRequests()
                .anyRequest().hasAnyRole(SecurityConstants.ROLE_APPLETS)
                .anyRequest().authenticated()
                .and()
                .addFilterAfter(new AppletAuthenticationFilter(), AnonymousAuthenticationFilter.class);
    }
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/config/SpringSecurityConfig.java
@@ -28,7 +28,6 @@
 **/
@Configuration
@EnableWebSecurity
@Order(SecurityProperties.BASIC_AUTH_ORDER-1)
public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
    @Resource
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/AppletAuthenticationFilter.java
@@ -59,7 +59,8 @@
        // 获取请求头中JWT的Token
        String tokenHeader = request.getHeader(TokenConstant.TOKEN_HEADER);
        if (null != tokenHeader && tokenHeader.startsWith(TokenConstant.TOKEN_PRE)) {
        if (null != tokenHeader && tokenHeader.startsWith(TokenConstant.TOKEN_PRE)
                &&realNamedConfig!=null && realNamedConfig.getVerify()!=null &&realNamedConfig.getVerify().size()>0) {
            String token = tokenHeader.replace(TokenConstant.TOKEN_PRE, "");
            // token解析
@@ -122,7 +123,7 @@
                }
            }
        }
        filterChain.doFilter(safeboxRequestWrapper, response);
        filterChain.doFilter(servletRequest, servletResponse);
    }
    @Override
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/resources/bootstrap.yml
@@ -52,6 +52,7 @@
      - PUT:/api/applets/index/microwish
      - POST:/api/applets/discuss
      - POST:/api/applets/discusscommentback
      - POST:/api/applets/discusscomment
      - PUT:/api/applets/discusscommentuser
      - POST:/api/applets/discussuser
      - PUT:/api/applets/discussuser
@@ -85,3 +86,5 @@
      - POST:/api/applets/user/pageeasyphoto
      - POST:/api/applets/neighbor/user/page
      - POST:/api/applets/pagehouse
      - GET:/api/applets/user/listfamily
      - POST:/api/applets/pagediscuss