• ramcr
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies

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!

  • August 26, 2010
  • Like
  • 0

Hi Friends,

 

I am new to salesforce. My requirement is that we are using our own 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.

 

Note : We want to use salesforce free site.

 

Any suggestions would be really help full.

 

Thanks Guys!

 

  • August 24, 2010
  • Like
  • 0

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!

  • August 26, 2010
  • Like
  • 0

Hi Friends,

 

I am new to salesforce. My requirement is that we are using our own 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.

 

Note : We want to use salesforce free site.

 

Any suggestions would be really help full.

 

Thanks Guys!

 

  • August 24, 2010
  • Like
  • 0

Does anyone know how to get the hostname in an Apex Batch class?

 

Note that the following does not work (null pointer exception) because the process is not associated with a Visual Force page:

 

     ApexPages.currentPage().getHeaders().get('Host');

 

My use case:

 

      My batch program sends emails that display images that I've stored as static resources.  The email module utilizes VF Email Template.