I'm trying to authenticate to a website that uses SimpleSAML without the browser but simply using cURL commands.
Basically I'm using Chrome's dev tools to see the redirects and what information is sent with each request.
So far I'm able to reach the IDP login page https://idp.mycompany.com/simplesaml/module.php/core/login.php?
, provide my credentials and send a post request to the IDP login url.
From there the request gets redirected to SSO login page https://login-page.mycompany.com/oam/server/fed/sp/sso
where I need to select user role and which is on a different address. When using curl commands at this step I'm getting "State Information Lost" error.
I can see the SimpleSAML token present in Response headers in the browser after entering credentials on IDP page, which looks like SimpleSAMLAuthToken=_cc877254d02fd4dc408c85482640b8a583b73887f6; path=/; HttpOnly
. And apparently when using cURL this gets lost when redirecting from IDP login page to SSO page.
Any suggestions how to solve the "State Information Lost" error would be highly appreciated.