如何在Spring Security Connect 5.x.x应用程序中为OpenId Connect客户端配置JWE密钥?

时间:2018-03-06 16:12:35

标签: spring spring-security openid-connect jose

是否可以为具有spring security 5.x.x的spring boot 2.0应用程序配置或自动装配JWE密钥选择器,以便能够解密从OpenId连接提供程序接收的id_oken?

JWS密钥可以由spring security oauth2 here定义。但是我找不到为client registration properties使用的JWTDecoder指定JWEKeySelector的方法。

提前致谢!

依赖关系:

buildscript {
    ext {
        springBootVersion = '2.0.0.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

ext['thymeleaf.version'] = '3.0.9.RELEASE'

dependencies {

    compile 'org.springframework.security:spring-security-config'
    compile 'org.springframework.security:spring-security-oauth2-client'
    compile 'org.springframework.security:spring-security-oauth2-jose'

    compile 'org.springframework.boot:spring-boot-starter-web'
    compile 'org.springframework.boot:spring-boot-starter-thymeleaf'
    compile 'org.thymeleaf.extras:thymeleaf-extras-springsecurity4'
    compile 'io.projectreactor.ipc:reactor-netty'
    compile 'org.springframework:spring-webflux'

    compile 'org.webjars:jquery:3.3.1-1'
    compile 'org.webjars:bootstrap:4.0.0-1'
    compile 'org.webjars:webjars-locator:0.32'

    testCompile 'org.springframework.security:spring-security-test'
    testCompile 'org.springframework.boot:spring-boot-starter-test'
}

0 个答案:

没有答案