领先一步
VMware 提供培训和认证,助您加速进步。
了解更多我谨代表社区,非常高兴地宣布 Spring Security 5.2.0.M3 发布!您可以在变更日志中找到完整的详细信息,以及以下亮点:
redirectUriTemplate 展开的更精细变量与其他请求后处理器类似,jwt() 可用于建立一个带有 JwtAuthenticationToken 的 SecurityContext。
mockMvc.perform(get("/")
.with(jwt(jwt -> jwt.claim("scope", "message:read"))));
有关 nohttp 项目的更多信息,请参阅这篇博客文章。
proxyBeanMethods=false此功能对 AbstractSecurityWebSocketMessageBrokerConfigurer 和 GlobalMethodSecurityConfiguration 类进行了重大更改。
为了适应这些更改,扩展 AbstractSecurityWebSocketMessageBrokerConfigurer 并重写 inboundChannelSecurity 方法的用户需要将其方法签名更新为匹配以下内容。
@Bean
public ChannelSecurityInterceptor inboundChannelSecurity(
MessageSecurityMetadataSource messageSecurityMetadataSource) {
// implementation
}
同样,扩展 GlobalMethodSecurityConfiguration 并重写 methodSecurityInterceptor 方法的用户需要将其方法签名更新为匹配以下内容。
@Bean
public MethodInterceptor methodSecurityInterceptor(
MethodSecurityMetadataSource methodSecurityMetadataSource) {
// implementation
}