<%@ page import="org.jasig.portal.security.provider.*" %>
<%@ page import="org.jasig.portal.security.*" %>
<%@ page import="java.util.*" %>
<%@ page import="com.pipeline.bom.Person_3" %>
<%@ page import="com.pipeline.bom.PersonManager_3" %>
<%@ page import="com.pipeline.bom.BomManagerFactory" %>
<%@ page import="com.pipeline.web.WebUtil" %>
<%@ page import="java.net.*" %>
<%
//Check to see if this is the Google search appliance
String googleApplianceAgent="gsa-crawler";
String userAgent = request.getHeader("User-Agent");
//index will be greater than 0 if the GSA is detected
int index=userAgent.indexOf(googleApplianceAgent);
//pass-through authentication ------------------------------------------------------
if (index < 0){ //if this is not the Google search appliance
String username = "";
try{
SimplePersonManager doriPerson = new SimplePersonManager();
IPerson i = doriPerson.getPerson(request);
String uid = (String)i.getAttribute("urn:sungardhe:dir:loginId");
//out.println(uid);
username = uid;
}catch (java.lang.NullPointerException e){
//user not logged in - redirect to login
String theRedirectURL = "/cp/home/displaylogin?goto=" + URLEncoder.encode(request.getRequestURL().toString().replace("http://", "https://"));
%>
<%
}catch (Exception e){
out.println("Error: " + e);
}
}
//END pass-through authentication ------------------------------------------------------
%>