Red Hat NETSCAPE DIRECTORY SERVER 6.02 - DEPLOYMENT Guide d'installation Page 136

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 192
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 135
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
/**
Vue de la page 135
1 2 ... 131 132 133 134 135 136 137 138 139 140 141 ... 191 192

Commentaires sur ces manuels

Pas de commentaire