You need to sign in to do that
Don't have an account?
How to capture header URL in the visualsource page
Hi Friends,
I am new to salesforce. My requirement is that we are using our company LDAP authentication. Upon successful authentication it should redirect the user to salesforce free site url but before it hits free site URL I wanted to check in the header URL to grab the HOST so that I can determine from where the request is coming from and if i found the reqest is coming from valid HOST then i will let the user to see our free site page otherwise will show him the error page.
LDAP-----> VisualSource Free Site URL
Here basically i want to trap LDAP URL.
It seems i don't even need to use controller for this. And just capture the LDAP source URL in visualsource itself.
But so far i am not able achieve this in visualsource because it seems there is no onload event in <apex:actionSupport
Below find the code i am trying :
<apex:page setup="true" controller="MyController" showHeader="false">
<apex:form >
<apex:outputpanel id="counter">
<apex:outputText value="Click Here To Generate Session Id and Server URL" />
<apex:actionSupport event="onload" action="{!doLogin}" rerender="refreshId" status="counterStatus">
<apex:param name="serverHostURL" assignTo="{!apiHostURL}" value="{!$Site.OriginalUrl}" />
</apex:actionSupport>
</apex:outputpanel><br></br>
<apex:outputPanel id="refreshId">
<apex:outputText value="API1 Server Host: {!apiHostURL}"/><br></br>
</apex:outputPanel>
</apex:form>
</apex:page>
Please let me know what i am doing wrong here.
Note : We want to use salesforce free site.
Any suggestions would be really help full.
Thanks Guys!
you want to catch header values or URL of the window?
Hi Prasanna,
Here is the scenario :
LDAP-----> VisualSource Free Site URL
Here basically i want to trap LDAP URL.
for example :
www.ldap.com ---- > VisualSource Free Site URL
Once the user is redirected to the VisualSource Free Site page from ldap.com i want to be able to read url www.ldap.com in visual source code.
i hope this time i am able to better explain my issue.
Thanks alot.
-Ram