You need to sign in to do that
Don't have an account?
Single Sign on using POST request
https://www.salesforce.com/login.jsp as given in the sample code by SalesForce.com. Heres the code:
<body onload="document.loginForm.submit();">
<form action="https://www.salesforce.com/login.jsp" method="POST" id="login" name="login">
<input type="hidden" name="un" runat="server" id="username"/>
<input type="hidden" name="pw" runat="server" id="token"/>
<input type="hidden" name="startURL" runat="server" id="startURL"/>
<input type="hidden" name="logoutURL" runat="server" id="logoutURL"/>
<input type="hidden" name="ssoStartPage" runat="server" id="ssoStartPage"/>
<input type="hidden" name="jse" value="0" id="jse"/>
<input type="hidden" name="rememberUn" value="1"/>
<script language="Javascript1.2" type="text/javascript">
document.getElementById("jse").value = 1;
</script>
</form>
</body>
The problem is that the login does not happen. I get the login page again after the post request, populated with the username. However, when I enter the password, I am able to login successfully.
Can somone help me please? We are applying for the enterprise edition, and without this, we can't be sure.
Thanks in advance,
Jyoti Khetan
correction in code. I am using
<body onload="document.login.submit();">
I got it to work by doing a simple redirect.
<script type="text/javascript">
<!--
window.location = "https://www.salesforce.com/login.jsp?pw=" + token +"&un=" + username
-->
</script>
Oh yeah! Nice trick..Thanks! :)
Jyoti
Hey
What about security. You are passing everything in URL
In addition we are using https so the transaction is encrypted.
The only problem I have left is I need SalesForce.com to return to my portal when logout occurs. I think I am going to open in a new window rather than the current window.
Any thoughts?
I haven't tried this, but SalesForce help says it will work. You can set that using the following hidden field on your page.
<input type="hidden" name="logoutURL" runat="server" id="logoutURL"/>
Can You please let me know in details how to implement my web application SSO in SF.com