<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Verdana size=2>J'ai finalement trouvé une solution à moindre 
coût:</FONT></DIV>
<DIV><FONT face=Verdana size=2>L'idée étant de gérer 2 portails au travers de la 
même instance zope, il fallait empêcher la connexion des membres d'un portail 
sur l'autre.</FONT></DIV>
<DIV><FONT face=Verdana size=2>Pour cela, le code du logged_in était presque 
suffisant:</FONT></DIV>
<DIV><FONT face=Verdana size=2>RESPONSE.expireCookie('__ac', path='/')<BR>return 
context.user_logged_in_failed()</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2>Mais le fait de faire un return 
context.user_logged_in_failed() empêchait la relecture du cookie et la page se 
chargeait pour une personne authentifiée alors qu'en réalité, le cookie avait 
expiré.</FONT></DIV>
<DIV><FONT face=Verdana size=2>J'ai simplement modifié ce return en 
:</FONT></DIV>
<DIV><FONT face=Verdana size=2>return 
RESPONSE.redirect('/user_logged_in_failed')</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2>Le fait de passer par l'objet RESPONSE permet de 
relire le cookie à priori. En tout cas le résultat escompté est 
atteint.</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2>Merci encore</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2>Cordialement</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>
<HR>
<FONT style="FONT-SIZE: 9px; COLOR: #00adce; FONT-FAMILY: Verdana"><FONT 
style="FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #0c4da2">Cédric 
Marfil</FONT><BR>Concepteur Réalisateur Intégrateur Confirmé<BR><B>Tél. 
direct:</B> 03.20.65.34.82<BR><B>Mail:</B> <A 
href="mailto:cedric.marfil@capgemini.com">cedric.marfil@capgemini.com</A><BR><BR><FONT 
style="FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #0c4da2">Cap</FONT><FONT 
style="FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #00adce">gemini</FONT><BR>181 
rue Jules Delcenserie<BR>59700 Marcq en Baroeul<BR></FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=ogrisel@nuxeo.com href="mailto:ogrisel@nuxeo.com">Olivier Grisel</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=cps-users-fr@lists.nuxeo.com 
  href="mailto:cps-users-fr@lists.nuxeo.com">cps-users-fr@lists.nuxeo.com</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, November 03, 2006 12:19 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [CPS-users-fr] Re: logged_in et 
  authentification</DIV>
  <DIV><BR></DIV>Cedric Marfil a écrit :<BR>&gt; Quelle est l'interaction du 
  CookieCrumbler avec le reste de la<BR>&gt; plateforme ? Je veux dire, comment 
  la plateforme sait-elle qu'elle doit<BR>&gt; taper sur le CookieCrumbler pour 
  faire l'authentification après le<BR>&gt; login_form ?<BR><BR>Le 
  CookieCrumbler intercepte toute les requete au niveau du publisher 
  pour<BR>recuperer les cookie d'authentication en debut de traitement de la 
  requete. Il<BR>me semble qu'il faut un monkey patch du publisher zope car 
  celui si n'est pas<BR>hookable si bas niveau (a verifier).<BR><BR>&gt; Je 
  souhaiterai en effet surcharger la méthode d'authentification.<BR><BR>Il est 
  possible de deriver la classe cookie crumbler et 
  MyAuthenticationManager<BR>par exemple et de supprimer l'instance de 
  CookieCrumbler&nbsp; qui se toruve a la<BR>racine de CPS et de la remplacer 
  par une instance de MyAuthenticationManager.<BR>C'est ce que font les produits 
  suivants :<BR><BR><A 
  href="http://svn.nuxeo.org/trac/pub/browser/CPS3/products/CPSKrb5Auth/trunk">http://svn.nuxeo.org/trac/pub/browser/CPS3/products/CPSKrb5Auth/trunk</A><BR><A 
  href="http://svn.nuxeo.org/trac/pub/browser/CPS3/products/CPSCasSso/trunk">http://svn.nuxeo.org/trac/pub/browser/CPS3/products/CPSCasSso/trunk</A><BR><A 
  href="http://svn.nuxeo.org/trac/pub/browser/Zope2/SecureAuth/trunk">http://svn.nuxeo.org/trac/pub/browser/Zope2/SecureAuth/trunk</A><BR><BR>respectivement: 
  kerberos, CAS SSO et certicat SSL avec Apache.<BR><BR>-- 
  <BR>Olivier<BR><BR>_______________________________________________<BR>cps-users-fr 
  <BR>Adresse de la liste : <A 
  href="mailto:cps-users-fr@lists.nuxeo.com">cps-users-fr@lists.nuxeo.com</A><BR>Gestion 
  de l'abonnement : &lt;<A 
  href="http://lists.nuxeo.com/mailman/listinfo/cps-users-fr">http://lists.nuxeo.com/mailman/listinfo/cps-users-fr</A>&gt;</BLOCKQUOTE></BODY></HTML>

<table><tr><td bgcolor=#ffffff><font color=#000000>This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.<br>
<br>
</font></td></tr></table>