SungHoon_Kim

Can I read headers from login.fcc

Blog Post created by SungHoon_Kim Employee on Apr 7, 2016

There will be time when you need to load some header information in the login.fcc page.

 

If you use asp or jsp page as the login page and it posts the credential to the backing login.fcc, you should have no problem reading any headers but if you are using login.fcc as login page there will be obvious limitations because fcc file is merely an HTML file with some additional features.

 

In the login.fcc file, you need to add smheaders parameter and register the header names that will be used.

Note: Only a limited headers would be available and you will need to test if your desired header can be made available using this method. For example, SiteMinder headers will not be available using this method.

 

As shown in the sample below, you need to register the header name with "smheaders". Colon is used as separator.

Then you can call them by wrapping them with double dollars. (see the red colour text in the below sample login.fcc)

For example:

@smheaders=headername1:headername2

Then call them using $$.

Header1: $$headername1$$
Header2: $$headername2$$

 

You can also call the query parameters, if you have query parameter called "myname" having "user1" as value, you can call it as $$myname$$ to display the "user1" value (see the blue colour text in the below sample login.fcc).

 

For example, if you have "user=kim" then $$user$$ will display "kim".

 

sample login.fcc

<!-- SiteMinder Encoding=UTF-8; -->

@username=%USER%

@smretries=0

@smheaders=ACCEPT_LANGUAGE:REMOTE_ADDR

 

 

<html>

 

 

<head>

<meta http-equiv="Content-Type" content="text/html;charset=$$SMENC$$">

  <title>SiteMinder Password Services - en-US</title>

 

 

<!-- Cross-frame scripting prevention: This code will prevent this page from being encapsulated within HTML frames. Remove, or comment out, this code if the functionality that is contained in this SiteMinder page is to be included within HTML frames. -->

<STYLE>

   html {

      display : none ;

      visibility : hidden;

   } </STYLE>

<SCRIPT>

   if( self == top ) {

       document.documentElement.style.display = 'block' ;

       document.documentElement.style.visibility = 'visible' ;

   } else {

       top.location = self.location ;

   }

</SCRIPT>

 

 

 

 

<SCRIPT LANGUAGE="JavaScript">

function resetCredFields()

{

  document.Login.PASSWORD.value = "";

}

 

 

function submitForm()

{

     document.Login.submit();

}

 

 

</SCRIPT>

 

 

</head>

 

 

<body BGCOLOR="#ffffff" TEXT="#000000" onLoad = "resetCredFields();">

 

 

<SCRIPT language='JavaScript'>

var USERNAME5 = "$$SM_USER$$";

var BROWSERLANGUAGE = "$$ACCEPT_LANGUAGE";

</SCRIPT>

 

 

<!-- Customer Brand -->

<IMG alt=Logo src="/siteminderagent/dmspages/CATechnologies_logo.png">

 

 

<form NAME="Login" METHOD="POST">

<INPUT TYPE=HIDDEN NAME="SMENC" VALUE="$$SMENC$$">

<INPUT type=HIDDEN name="SMLOCALE" value="US-EN">

<center>

 

 

<!-- outer table with border -->

<table width="50%" height=200 border=1 cellpadding=0 cellspacing=0 >

  <tr>

    <td>

   <!-- Login table -->

      <table WIDTH="100%" HEIGHT=200 BGCOLOR="#FFEFD5" border=0 cellpadding=0 cellspacing=0 >

 

 

  <tr>

   <td ALIGN="CENTER" VALIGN="CENTER" HEIGHT=40 COLSPAN=4 NOWRAP BGCOLOR="#FFDAB9">

  <font size="+1" face="Arial,Helvetica">

  <b>Please Login</b></font>

       </td>

  </tr>

 

 

  <tr> <td colspan=4 height=10> <font size=1>   </font> </td> </tr>

 

 

  <tr>

   <td WIDTH=20 > </td>

   <td ALIGN="LEFT" >

     <b><font size=-1 face="arial,helvetica" > Username: </font></b>

   </td>

   <td ALIGN="LEFT" >

    <input type="text" name="USER" value="$$REMOTE_USER$$" size="30" style="margin-left: 1px">

   </td>

   <td WIDTH=20 > </td>

  </tr>

 

 

  <tr> <td colspan=4 height=10> <font size=1>   </font> </td> </tr>

 

 

  <tr>

   <td WIDTH=20 > </td>

   <td >

     <b><font size=-1 face="arial,helvetica" > Password: </font></b>

       </td>

   <td ALIGN="left" >

    <input type="password" name="PASSWORD" size="30" style="margin-left: 1px">

   </td>

   <td WIDTH=20 > </td>

  </tr>

 

 

  <tr> <td colspan=4 height=10> <font size=1>   </font> </td> </tr>

 

 

  <tr>

   <td colspan=4 NOWRAP WIDTH="50%" HEIGHT="25" align="CENTER">

       <input type=hidden name=target value="$$target$$">

       <input type=hidden name=smquerydata value="$$smquerydata$$">

       <input type=hidden name=smauthreason value="$$smauthreason$$">

       <input type=hidden name=smagentname value="$$smagentname$$">

       <input type=hidden name=postpreservationdata value="$$postpreservationdata$$">

       <input type="button" value="Login" onClick="submitForm();">

   </td>

  </tr>

    <tr>

        <td>

            target=$$target$$<br>

            smquerydata=$$smquerydata$$<br>

            smauthreason=$$smauthreason$$<br>

            smagentname=$$smagentname$$<br>

            ACCEPT_LANGUAGE=$$ACCEPT_LANGUAGE$$<br>

            REMOTE_ADDR=$$REMOTE_ADDR$$<br>

        </td>

    </tr>

 

 

  <tr> <td colspan=4 height=5> <font size=1>   </font> </td> </tr>

      </table>

    </td>

  </tr>

</table>

</form></center>

 

 

<script language="javascript">

  document.forms["Login"].elements["USER"].focus();

</script>

 

 

</body>

</html>

 

Following is a screenshot of the login.fcc displaying the above querystring and headers.

Outcomes