浏览 SSO 页面

h.z*_*zak 12 curl single-sign-on onelogin

我想使用curl命令行测试SSO身份验证[我使用OneLogin作为IDP],但我不知道如何运行curl请求来通过身份验证页面

curl -L -c cookie.txt -d "LoginName=mylogin" -d "password=mypassword" https://example.comcurl -b cookie.txt https://example.com

在此示例中,https://example.com是使用 OneLogin IDP 保护的页面的链接

对于第二个请求,我收到了页面:

<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="linkttoIDP">here</a>.</p>
</body></html>
Run Code Online (Sandbox Code Playgroud)

您有任何想法通过命令行通过 sso 吗?

先感谢您