session.setAttribute(__J_AUTHENTICATED,null);
}
else if (realm instanceof SSORealm)
{
// Try a single sign on.
Credential cred = ((SSORealm)realm).getSingleSignOn(httpRequest,httpResponse);
if (httpRequest.hasUserPrincipal())
{
form_cred=new FormCredential();
form_cred._userPrincipal=request.getUserPrincipal();
form_cred._jUserName=form_cred._userPrincipal.getName();
if (cred!=null)
form_cred._jPassword=cred.toString();
if(log.isDebugEnabled())log.debug("SSO for "+form_cred._userPrincipal);
httpRequest.setAuthType(SecurityConstraint.__FORM_AUTH);
session.setAttribute(__J_AUTHENTICATED,form_cred);
return form_cred._userPrincipal;