Spring Boot OAuth2和Azure AD
我正在尝试配置一个ResourceServer,其中Spring Boot Oauth2连接到Azure AD作为授权服务器,因此这是我的application.yml文件:Spring Boot OAuth2和Azure AD,azure,spring-boot,Azure,Spring Boot,我正在尝试配置一个ResourceServer,其中Spring Boot Oauth2连接到Azure AD作为授权服务器,因此这是我的application.yml文件: security: oauth2: client: clientId: xxx clientSecret: xxx resource: security.oauth2.resource.jwk.key-set-uri: https://login.microsofto
security:
oauth2:
client:
clientId: xxx
clientSecret: xxx
resource:
security.oauth2.resource.jwk.key-set-uri: https://login.microsoftonline.com/common/discovery/keys
logging:
level:
org.springframework.security: debug
但当我尝试启动我的应用程序时,我得到了:
原因:缺少tokenInfoUri和userInfoUri,并且没有JWT验证器密钥
但是在Azure AD中,我没有tokenInfoUri,userInfoUri是:,但我认为它对客户端凭据流没有帮助(我的情况)您的
应用程序.yml
文件中的jwk.key set uri
:
security:
oauth2:
client:
clientId: xxx
clientSecret: xxx
resource:
jwk.key-set-uri: https://login.microsoftonline.com/common/discovery/keys
logging:
level:
org.springframework.security: debug
您的
application.yml
文件中的jwk.key set uri
似乎有一个输入错误:
security:
oauth2:
client:
clientId: xxx
clientSecret: xxx
resource:
jwk.key-set-uri: https://login.microsoftonline.com/common/discovery/keys
logging:
level:
org.springframework.security: debug