【发布时间】:2021-07-11 05:04:56
【问题描述】:
当我尝试在 localhost 中运行时,它工作正常。但是,当我尝试在负载均衡器后面运行相同的程序时,会出现以下错误:
AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: '<clien-id>'.
我已在 AzureAD 中使用负载均衡器 URL 注册了应用程序。但是当我发送请求时,重定向 URL 仍然是 localhost,如下所示。
我希望我的应用程序将负载均衡器 URL 插入为 redirect_url 的值(而不是 localhost)。
我尝试了以下建议的解决方案,但仍然没有成功:
Redirect URL for Spring OAuth2 app on Azure with Active Directory: Invalid Redirect URI Parameter
Spring Boot using Azure OAuth2 - reply URL does not match error
提前致谢。
【问题讨论】:
-
谢谢卡尔。我解码了,这就是我粘贴在下面的内容。我需要一些可以在我的 Java Spring 引导应用程序中自定义的方法。
-
您需要在 Azure 门户和代码中更改 redirect_uri。如果两个网址不相同,就会报错。
-
是的,我检查过很多次,但看起来没问题。仍在尝试..谢谢
标签: spring-security oauth-2.0 azure-active-directory spring-security-oauth2