Installation guide
Deploying the Integrated SSO Solution
136 Sun ONE Identity Server Policy Agents 2.1 • Web Policy Agents Guide • April 2005
import java.io.PrintWriter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import oracle.security.sso.ias904.toolkit.IPASAuthInterface;
import oracle.security.sso.ias904.toolkit.IPASAuthException;
import oracle.security.sso.ias904.toolkit.IPASUserInfo;
import oracle.security.sso.ias904.toolkit.IPASInsufficientCredException;
import java.net.URL;
public class SSOTPAMAuth implements IPASAuthInterface {
private static String CLASS_NAME = "SSOTPAMAuth";
private static String TPAM_USER_HEADER = "identity-user";
public SSOTPAMAuth() {
}
public IPASUserInfo authenticate(HttpServletRequest request) throws
IPASAuthException, IPASInsufficientCredException {
String TPAMUserName = null;
try {
TPAMUserName = request.getHeader(TPAM_USER_HEADER);
} catch (Exception e) {
throw new IPASInsufficientCredException("No TPAM Header");
}
if (TPAMUserName == null) throw new IPASInsufficientCredException("No TPAM
Header");
IPASUserInfo authUser = new IPASUserInfo(TPAMUserName);
return authUser;
}
public URL getUserCredentialPage(HttpServletRequest request, String msg)
{
// This function will never have been reached in the case of TPAM
// as the TPAM Agent will intercept all requests
try {
return new URL("<error.html>");
} catch (Exception e) {
System.out.println("Exception in SSOTPAMAuth");
e.printStackTrace();
}
System.out.println("Error encountered in SSOTPAMAuth");
return null;
}
}
Code Example 5-3
SSOTPAMAuth.java
/**