上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 31 下一页
摘要: UsernamePasswordAuthenticationFilter处理表单登录及认证。 AbstractAuthenticationProcessingFilter#doFilter private void doFilter(HttpServletRequest request, HttpS 阅读全文
posted @ 2023-05-03 12:20 shigp1 阅读(525) 评论(0) 推荐(0)
摘要: LogoutFilter用于注销登录。 private void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletExce 阅读全文
posted @ 2023-05-02 18:16 shigp1 阅读(417) 评论(0) 推荐(0)
摘要: DefaultLoginPageGeneratingFilter用于生成默认登录页。 private void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws I 阅读全文
posted @ 2023-05-02 15:07 shigp1 阅读(280) 评论(0) 推荐(0)
摘要: ###SecurityContextHolderAwareRequestFilter SecurityContextHolderAwareRequestFilter对Servelet3.0的api做了封装。 public void doFilter(ServletRequest req, Servl 阅读全文
posted @ 2023-05-02 14:12 shigp1 阅读(514) 评论(0) 推荐(0)
摘要: SpringSecurity提供了匿名登录功能,让我们不登录也能访问。比如/anoy路径及子路径都能匿名访问,配置如下: @Configuration public class MySecurityConfig extends WebSecurityConfigurerAdapter { @Over 阅读全文
posted @ 2023-05-01 20:20 shigp1 阅读(1330) 评论(0) 推荐(0)
摘要: SecurityContextPersistenceFilter在请求之前从配置的SecurityContextRepository获得的信息填充SecurityContextHolder,并在请求完成并清除上下文holder后将其存储回存储库。默认情况下,它使用HttpSessionSecurit 阅读全文
posted @ 2023-04-30 19:54 shigp1 阅读(225) 评论(0) 推荐(0)
摘要: ##一、为什么需要web Flux 部分原因是需要一个无阻塞的web堆栈来处理少量线程的并发性,并用更少的硬件资源进行扩展。Servlet 3.1确实为非阻塞I/O提供了一个API。然而,使用它会偏离Servlet API的其余部分,在那里交互是同步的(Filter,Servlet)或阻塞的(get 阅读全文
posted @ 2023-04-30 16:51 shigp1 阅读(1266) 评论(0) 推荐(0)
摘要: SessionManagementFilter检测用户自请求开始以来是否已通过身份验证,如果已通过,则调用SessionAuthenticationStrategy以执行任何与会话相关的活动,例如激活会话固定保护机制或检查多个并发登录。配置如下: @Configuration public clas 阅读全文
posted @ 2023-04-30 14:41 shigp1 阅读(590) 评论(0) 推荐(0)
摘要: HeaderWriterFilter用于对当前的HttpServletResponse添加某些浏览器保护的响应头。HeaderWriterFilter由HeadersConfigurer配置,在执行HeadersConfigurer#configure时调用createHeaderWriterFil 阅读全文
posted @ 2023-04-22 21:43 shigp1 阅读(353) 评论(0) 推荐(0)
摘要: ExceptionTranslationFilter是处理AuthenticationException(身份认证异常)和AccessDeniedException(权限异常)。ExceptionTranslationFilter用法和源码分析参考一文搞定 Spring Security 异常处理机 阅读全文
posted @ 2023-04-22 15:28 shigp1 阅读(221) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 31 下一页