Microsoft如何在与Azure AD进行单点登录时使用POST方法重定向到客户端应用程序

huangapple go评论52阅读模式
英文:

How does Microsoft redirect to client application with Post method when SSO with Azure AD

问题

我们的网络应用程序具有使用Azure AD的SSO功能。工作流程如下:

  1. 用户访问我们的网络应用程序。
  2. 在登录屏幕上,用户点击使用Microsoft登录按钮。
  3. 用户将被重定向到Microsoft登录屏幕
  4. 用户输入他的Microsoft凭据,点击登录按钮。
  5. 如果启用了多重身份验证(MFA),用户将完成MFA。
  6. 在经过身份验证后,Microsoft将用户重定向回我们的网络应用程序,并使用POST方法传递id_tokenform_data中。

所以,我的问题是,Microsoft如何能够使用POST方法重定向用户并传递id_tokenform_data中?据我所知,我们只能使用GET方法重定向用户,无法传递表单数据。

下面的图像说明了我看到的情况。

英文:

Our web application has SSO feature using Azure AD. The workflow is:

  1. User access our web application.
  2. On login screen, user click Sign in with Microsoft button.
  3. User will be redirected to Microsoft Login screen.
  4. User enters his Microsoft credentials, click Login button.
  5. User complete MFA if enabled.
  6. After authenticated, Microsoft will redirect user back to our web application, pass the id_token in form_data with POST method.

So, my question is, how Microsoft can redirect user with POST method and pass the id_token in form_data? As I know, we can only redirect user with GET method, and cannot pass the form data.

Below image illustrates what I saw.

Microsoft如何在与Azure AD进行单点登录时使用POST方法重定向到客户端应用程序

答案1

得分: 2

Azure AD返回一个HTML页面,该页面自动提交一个表单,该表单的目标是您的URL。

正如您所说,重定向不能使用POST方法,只能使用GET方法。
但是HTML表单可以使用POST方法。

如果您查看前一个请求的响应,您会看到这个表单。

英文:

Azure AD returns an HTML page that auto-submits a form which targets your URL.

As you said, a redirect cannot use POST method, only GET.
But an HTML form can use the POST method.

You'll see this form if you look at the response of the previous request.

huangapple
  • 本文由 发表于 2023年5月26日 16:43:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/76339130.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定