
zopqp (zopqp) asked a question.
I have seen numerous discussions about the Okta stateToken, but to date still have not found out how to generate or capture one for use in testing an Okta SAML protected application.
Here is an example where the stateToken is needed inside a Gatling (SCALA-based) script:
.exec(http("request_10")
.post("https://sso-cert.johndeere.com/api/v1/authn")
.headers(headers_10)
.body(StringBody("{\"stateToken\":\"003U5_yoT8QBJybM87x_jLnaJXPHN1x2IOtvpQhRQx\"}")))
The trouble is, I do not see the stateToken being provided somewhere before this step, so I cannot somehow capture it or generate it so I can get logged in to the site.
I have written code for generating the sessionToken, but this (apparently) is not the same thing. I also have found a way to feed the SAMLResponse to the testing script, though generating one inside of Gatling would be better.
I have read all of the Okta API information, but do not see an example of how to do what I need to do.
Our OIDC Okta users have SCALA code, but not for SAML.
Thanks,
Randy Stevenson
Deere & Company

Hey there! Sorry for the lack of response here on the Discussions forum. If you’re still looking for an answer, I would recommend checking out our Developer resources, including the Developer Forum (https://devforum.okta.com/) and documentation. If you are unable to find the solutions you're looking for there, we would encourage you to contact our dedicated Developer Support team at developers@okta.com, and they will be able to help you out.