我正在实现示例应用程序,它应该结合SAML 2.0、Oauth 2.0和UMA 2.0。我已经使用以下方法生成了Spring Boot模板 initializr.
我一开始就被卡住了 saml2ogin()
. 看来SAML 2.0的支持没有了。RelyingPartyRegistrationRepository
是不可用的。当我在 HttpSecurity
类,我有 org.springframework.security.saml2 - 无法解析符号 "saml2"。根据文档。https:/docs.spring.iospring-securitysitedocs5.3.xreferencehtml5。 SAML 2.0支持应该捆绑在spring-boot-starter-security中。
我是不是错过了什么?
我的build.gradle。
plugins {
id 'org.springframework.boot' version '2.2.6.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'org.springframework.security:spring-security-test'
}
test {
useJUnitPlatform()
}
implementation 'org.springframework.security:spring-security-saml2-service-provider'
据我所知,这个依赖关系被标记为可选的,所以它必须被明确地包含。
https:/github.comspring-projectsspring-securityblobmasterconfigspring-security-config.gradle。