【发布时间】:2020-04-07 07:33:43
【问题描述】:
我正在实现示例应用程序,它应该结合 SAML 2.0、Oauth 2.0 和 UMA 2.0。我使用 initializr 生成了 Spring Boot 模板。
我一开始就被saml2ogin() 卡住了。似乎缺少 SAML 2.0 支持。 RelyingPartyRegistrationRepository 不可用。当我浏览 HttpSecurity 类中的导入时,我有 org.springframework.security.saml2 - 无法解析符号“saml2”。
根据文档:
https://docs.spring.io/spring-security/site/docs/5.3.x/reference/html5/
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()
}
【问题讨论】:
标签: spring-boot saml-2.0