先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里P7
深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年最新大数据全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上大数据知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
如果你需要这些资料,可以添加V获取:vip204888 (备注大数据)
正文
}
private void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
throws IOException, ServletException {
//通过requestMatcher判断request请求是否需要处理
if (!requiresAuthentication(request, response)) {
chain.doFilter(request, response);
return;
}
try {
//获取身份认证结果,并创建认证对象,由子类实现,OAuth2 使用的是OAuth2LoginAuthenticationFilter
Authentication authenticationResult = attemptAuthentication(request, response);
if (authenticationResult == null) {
// return immediately as subclass has indicated that it hasn’t completed
return;
}
//对会话进行处理,防止会话固定攻击(session-fixation详情可网上查询)
this.sessionStrategy.onAuthentication(authenticationResult, request, response);
//认证成功后,是否继续执行后面的过滤器
if (this.continueChainBeforeSuccessfulAuthentication) {
chain.doFilter(request, response);
}
//处理认证成功后的处理逻辑,委托给AuthenticationSuccessHandler,此处为SavedRequestAwareAuthenticationSuccessHandler
successfulAuthentication(request, response, chain, authenticationResult);
}
catch (InternalAuthenticationServiceException failed) {
this.logger.error(“An internal error occurred while trying to authenticate the user.”, failed);
//认证失败处理
unsuccessfulAuthentication(request, response, failed);
}
catch (AuthenticationException ex) {
// Authentication failed
//认证失败处理
unsuccessfulAuthentication(request, response, ex);
}
}
其中attemptAuthentication处的代码量很大,作用是:获取身份认证结果,并创建认证对象,由子类实现,OAuth2 使用的是OAuth2LoginAuthenticationFilter,我们来看看这部分
public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)
throws AuthenticationException {
//从授权服务器回调的URL请求中,将请求参数转换为map格式,key=参数名,value=参数值
MultiValueMap<String, String> params = OAuth2AuthorizationResponseUtils.toMultiMap(request.getParameterMap());
//根据code、status、error字段判断是否为返回请求
if (!OAuth2AuthorizationResponseUtils.isAuthorizationResponse(params)) {
OAuth2Error oauth2Error = new OAuth2Error(OAuth2ErrorCodes.INVALID_REQUEST);
throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString());
}
//返回OAuth2AuthorizationRequest,该对象在OAuth2LoginAuthenticationFilter中构建
//removeAut