【发布时间】:2025-12-21 09:50:10
【问题描述】:
我正在开发 jsp-springboot 应用程序,我已经使用 azure 实现了 sso,它按预期工作。我已经配置了
azure.activedirectory.tenant-id
azure.activedirectory.client-id
azure.activedirectory.client-secret
我还添加了重定向网址 在 application.properties 中,除了这些更改之外,我没有添加任何配置类,我也能够成功登录 ajax GET 调用正在返回 200 响应代码,但对于 POST 调用出现 403 禁止错误
获取通话样本
$.ajax({
type: 'GET',
url: "/getvalue/"+productId,
contentType: "text/plain",
dataType: 'json',
success: function (data) {
console.log("Success");
},
error: function (e) {
console.log("There was an error with your request...");
}
});
还有邮局电话
$.ajax({
type: 'POST',
url: "/saveValue",
data:JSON.stringify(valueObj),
contentType: "application/json",
success: function (data) {
console.log("success: ");
},
error: function (e) {
console.log("There was an error with your request...");
}
});
我不知道为什么邮局电话不起作用
【问题讨论】:
-
服务器是否需要 csrf 令牌?
-
@sdoxsee 我没有配置任何过滤器
标签: javascript spring-boot azure spring-mvc single-sign-on