使用 Azure AD 的 Springboot+Oauth 客户端凭据授予流程

时间:2021-01-04 09:03:49

标签: azure spring-boot oauth-2.0

我正在尝试使用客户端凭据授予流和 Azure AD 作为授权服务器来保护我的 API (springboot+java)。 我查看了互联网,但我发现的示例是 springboot 中的资源和授权服务器。 有没有人有关于如何使用 Java Springboot 和 Azure AD 通过客户端凭据授予流程保护 API 的示例? 任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

我们使用 client credentials flow 通过以下步骤获取访问令牌。访问令牌由 Azure AD 提供。

enter image description here

ClientCredentialsResourceDetails试试这个sample