gpt4 book ai didi

azure - 针对 Azure AD 的主动身份验证

转载 作者:行者123 更新时间:2023-12-03 05:41:31 25 4
gpt4 key购买 nike

之前,我们使用 AD 为我们的客户端启用了基于 ADFS 的主动身份验证。

我们通过以下curl命令实现主动身份验证:

curl https://server.com/adfs/services/trust/13/usernamemixed --data @request.txt -H "Content-Type:application/soap+xml"--verbose -o "output.txt"。

这是我的 request.txt 文件

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" 
xmlns:a="http://www.w3.org/2005/08/addressing"
xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
>
<s:Header>
<a:Action s:mustUnderstand="1">http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue</a:Action>
<a:To s:mustUnderstand="1">https://server.com/adfs/services/trust/13/usernamemixed</a:To>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2019-10-09T13:29:54Z</u:Created>
<u:Expires>2019-10-09T13:30:54Z</u:Expires>
</u:Timestamp>
<o:UsernameToken u:Id="uuid-6a13a244-dac6-42c1-84c5-cbb345b0c4c4-1">
<o:Username>' . $user_name . '</o:Username>
<o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"><![CDATA[' . $password . ']]></o:Password>
</o:UsernameToken>
</o:Security>
</s:Header>
<s:Body>
<trust:RequestSecurityToken xmlns:trust="http://docs.oasis-open.org/ws-sx/ws-trust/200512">
<wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<a:EndpointReference>
<a:Address>https://server.com/adfs/ls</a:Address>
</a:EndpointReference>
</wsp:AppliesTo>
<trust:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</trust:KeyType>
<trust:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue</trust:RequestType>
<trust:TokenType>urn:oasis:names:tc:SAML:2.0:assertion</trust:TokenType>
</trust:RequestSecurityToken>
</s:Body>
</s:Envelope>

现在我想在 Azure AD 上实现类似的主动身份验证,并且我想知道等效方法的方法。

有人可以解释一下吗?

干杯

最佳答案

最相似的流程是 OAuth ROPC 流程:https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth-ropc .

我建议您不要使用它,除非您要迁移旧版应用程序。相反,如果可能,您应该使用以下流程之一:

  • 授权代码流程
  • 隐式流程
  • 设备代码流程

它们的优点是您的应用不需要处理密码。它们还与 MFA 兼容,而 ROPC 则不兼容。

关于azure - 针对 Azure AD 的主动身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58305152/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com