2

我正在尝试将单个应用程序配置spring-boot-starter-oauth2-resource-server为. 遵循这些说明后,我遇到以下错误:spring-boot-starter-oauth2-clientweb_application_and_resource_server

Error: Caused by: java.lang.IllegalStateException: Web Api do not support authorization_code grant type. id = graph.

我不确定如何配置资源服务器的属性,我尝试了以下属性:

azure.activedirectory.tenant-id=###
# Specifies your App Registration's Application ID:
azure.activedirectory.client-id=###
# Specifies your App Registration's secret key:
azure.activedirectory.client-secret=###
azure.activedirectory.application-type = web_application_and_resource_server
#azure.activedirectory.app-id-uri=##
#azure.activedirectory.authorization-clients.api.authorizationGrantType=on_behalf_of
#azure.activedirectory.authorization-clients.api.scopes=https://graph.microsoft.com/User.Read
azure.activedirectory.authorization-clients.graph.authorizationGrantType=authorization_code
azure.activedirectory.authorization-clients.graph.scopes=https://graph.microsoft.com/User.Read,Directory.AccessAsUser.All,offline_access,openid,profile,email

配置如何应用于资源服务器? 使用上述配置,我收到一个错误webapi cant accept authorisation code as a granttype,这是真的。

AZure 广告级别是否需要任何特定配置? 所有 API 都在 Spring Boot 应用程序本身内。我只需要使用令牌对所有 API 进行身份验证。

4

0 回答 0