请问现在项目启动起来了,怎么取消登陆验证。或者是直接前端验证

提问 未结 4 68
心挚
心挚 2019-07-09
悬赏:20积分
版本:renren-fast 浏览器:
请问现在项目启动起来了,怎么取消登陆验证。或者是直接前端验证。不需要后台验证,直接前端用admin就登陆了
回帖
  • 不登录就能访问?
    0 回复
  • 心挚
    心挚 (楼主)
    2019-07-09
    @Mark 登陆也可以,我现在想用前端来处理登陆,不需要后台就完成
    0 回复
  • @心挚 还是没明白
    0 回复
  • TS
    2019-07-09
    修改shiro的配置,允许全部请求 搜索配置文件ShiroConfig 修改img[//cdn.renren.io/4478d201907091556257786.png] 将如图配置 改为 [pre] @Bean("shiroFilter") public ShiroFilterFactoryBean shirFilter(SecurityManager securityManager) { ShiroFilterFactoryBean shiroFilter = new ShiroFilterFactoryBean(); shiroFilter.setSecurityManager(securityManager); //oauth过滤 Map<String, Filter> filters = new HashMap<>(); filters.put("oauth2", new Oauth2Filter()); shiroFilter.setFilters(filters); Map<String, String> filterMap = new LinkedHashMap<>(); // filterMap.put("/webjars/**", "anon"); // filterMap.put("/druid/**", "anon"); // filterMap.put("/login", "anon"); // filterMap.put("/swagger/**", "anon"); // filterMap.put("/v2/api-docs", "anon"); // filterMap.put("/swagger-ui.html", "anon"); // filterMap.put("/swagger-resources/**", "anon"); // filterMap.put("/service/**", "anon"); // filterMap.put("/editor-app/**", "anon"); // filterMap.put("/diagram-viewer/**", "anon"); // filterMap.put("/modeler.html", "anon"); // filterMap.put("/captcha", "anon"); // filterMap.put("/favicon.ico", "anon"); // filterMap.put("/**", "oauth2"); filterMap.put("/**", "anon"); shiroFilter.setFilterChainDefinitionMap(filterMap); return shiroFilter; } [/pre]
    0 回复