如何在SpringBoot 2.0.0.M7 App中的application.properties中使用propeties?
我已经接受了documentation,但我不知道是否需要明确地使用OAuth2ClientProperties
还有一件事,文档并没有根据自动完成情况而定 语法参数
我的application.properies :
spring.security.oauth2.client.provider.verimi.authorization-URI = https://verimi.com/dipp/api/oauth/authorize spring.security.oauth2.client.provid spring.security.oauth2.client.registration.verimi.scope =登录 spring.security.oauth2.client.registration.verimi.authorization发放-typeer.verimi.tokenUri = https://verimi.com/dipp/api/oauth/token spring.security.oauth2.client.registration.verimi.client-ID =磷酰化 spring.security.oauth2.client.registration.verimi.clientSecret = G | 41 | 0an18ZIs_w spring.security.oauth2.client.registration.verimi.provider = verimi = authorization_code
OAuthConfig :
@Configuration
@EnableOAuth2Client
class OAuth2Config {
// What do I need to add ?
@Bean
fun oauth2RestTemplate(oauth2ClientContext: OAuth2ClientContext,
details: OAuth2ProtectedResourceDetails): :/* <--Error here : not bean found*/ OAuth2RestTemplate = OAuth2RestTemplate(details, oauth2ClientContext)
}
THX
答案 0 :(得分:0)
Verimi不使用普通的OAuth2,而是使用OAuth2作为授权协议的OpenID Connect。几天前,我成功完成了官方Verimi Spring Boot sample的工作。如果这对您有帮助,我已将其推送到Github。