Copy link to clipboard
Copied
I am using this code amd works fine in my environment but when I try it in different CF 2018 environment is giving me an error the form,SAMLRespose does not not exist. Any help appreciated.
accountSettings = createObject("java","com.onelogin.AccountSettings");
accountSettings.setCertificate(reReplace(request.company.getCertificate(),"-----BEGIN CERTIFICATE-----|-----END CERTIFICATE-----","","all"));
// Generate an AuthRequest and send it to the identity provider
b64Coded = createObject("java","org.apache.commons.codec.binary.Base64");
xmlString = toString(b64Coded.decode(trim(form.SAMLResponse)));
Copy link to clipboard
Copied
Kam, as a sanity check, dump that form scope and all variables used in that code fragment...putting that just before it. Compare it to the same results on the working sever. You may see something differs, and you could then track that down.
Also, report to us the cf update number (0-16) and jvm update number (11.01-11.0.19), as reported in the cf admin settings summary page (or a cfdump of the server scope). These may differ between the two cf2018 instances.
Also, what differs about the machines in which they run? Might the saml service your calling be configured to recognize one but not the other" such as by ip?
Finally, let me take the chance to point out for you and others reading along that cf2018 will gets its last updates in July, 5 years after it came out.
Copy link to clipboard
Copied
Are you sure the correct function to use is decode(), and not decodeBase64() ?
In any case, it would help if you shared the full error message, including the line that generates the error.