Spring Security 5.2.0.M2 发布,Spring 安全框架

栏目: 软件资讯 · 发布时间: 6年前

内容简介:Spring Security 5.2.0.M2 已发布,该版本包含超过 100 处更新。下面说说值得关注的更新: OAuth 2.0 客户端支持 PKEC OpenID 连接 RP-Initiated Logout 能够使用 JwtDecoder 的对称密钥 NimbusReactiveJwtDecod...

Spring Security 5.2.0.M2 已发布,该版本包含超过 100 处更新。下面说说值得关注的更新:

OAuth 2.0

  • 客户端支持 PKEC
  • OpenID 连接 RP-Initiated Logout

  • 能够使用 JwtDecoder 的对称密钥

  • NimbusReactiveJwtDecoder 能够采用自定义处理器

  • 支持资源服务器令牌自检

  • 支持资源服务器多租户(仅限 Servlet)

Core

  • 将密钥材料转换为密钥实例
  • 支持 JDK 12
  • 引入 AuthenticationManagerResolver
  • 为方法参数引入 @CurrentSecurityContext

与之前的 @AuthenticationPrincipal 一样,@CurrentSecurityContext 使用参数解析器来检索 SecurityContext 的各个方面:

public String hello(@CurrentSecurityContext
        SecurityContext context) {
    return Optional.ofNullable(context.getAuthentication())
            .map(Authentication::getName).orElse("world");
}

// or

public String hello(@CurrentSecurityContext
        (expression="authentication.name") String name) {
    return Optional.ofNullable(name).orElse("world");
}

Web

  • 支持 Clear-Site-Data 标头
  • 支持 HSTS 预加载
  • 引入 CompositeHeaderWriter,以及其他一些 header-writing cleanup

详情可查看发布说明

下载地址:

Source code(zip)

Source code(tar.gz)


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

TensorFlow:实战Google深度学习框架(第2版)

TensorFlow:实战Google深度学习框架(第2版)

顾思宇、梁博文、郑泽宇 / 电子工业出版社 / 2018-2-1 / 89

TensorFlow是谷歌2015年开源的主流深度学习框架,目前已得到广泛应用。《TensorFlow:实战Google深度学习框架(第2版)》为TensorFlow入门参考书,旨在帮助读者以快速、有效的方式上手TensorFlow和深度学习。书中省略了烦琐的数学模型推导,从实际应用问题出发,通过具体的TensorFlow示例介绍如何使用深度学习解决实际问题。书中包含深度学习的入门知识和大量实践经......一起来看看 《TensorFlow:实战Google深度学习框架(第2版)》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具