【发布时间】:2020-03-27 06:49:04
【问题描述】:
我想使用https://login.microsoftonline.com/{tenant}/oauth2/token 端点登录我的应用程序。我在发布请求中填写参数(client_id、client_secret、resource 和 grant_type:client_credentials)并获取访问令牌。当我使用它登录我的 API 时,spring boot 给了我错误:
com.microsoft.aad.adal4j.AuthenticationException: {"error_description":"AADSTS50058: A silent sign-in request was sent but no user is signed in.
我应该怎么做才能仅通过发布请求获得有效的不记名令牌?还是我缺少任何 azure 配置?
【问题讨论】:
-
您能否为您的问题添加更多详细信息?您使用的是什么版本的 Spring Boot?你是如何配置 Spring Security 的?
-
@WimDeblauwe 现在我正在使用 azure-active-directory-spring-boot-starter 2.2.0.M1。添加了 AADAuthenticationFilter 过滤器。它正在使用微软的弹出窗口,但我需要在没有任何 GET 请求的情况下获取承载。我想用 POST 请求来做。
标签: azure spring-boot azure-active-directory bearer-token jwt-auth