<br>Hi, Souheil,<div>I already did that. and found a way to make it working.</div><div>Here are the steps.</div><div>With all the code I pasted in the previous message.</div><div>Add a grok view for <font class="Apple-style-span" color="#333333">IUnauthorized</font></div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div><font class="Apple-style-span" color="#666666">from zope.security.interfaces import IUnauthorized</font></div><div><div><font class="Apple-style-span" color="#666666">class Unauthorized(grok.View):</font></div>
<div><font class="Apple-style-span" color="#666666">    grok.context(IUnauthorized)</font></div><div><font class="Apple-style-span" color="#666666">    <a href="http://grok.name">grok.name</a>(&quot;index.html&quot;)</font></div>
<div><font class="Apple-style-span" color="#666666">    grok.require(&quot;zope.Public&quot;)</font></div><div><font class="Apple-style-span" color="#666666">    def render(self):</font></div><div><font class="Apple-style-span" color="#666666">        principal=self.request.principal</font></div>
<div><font class="Apple-style-span" color="#666666">        auth=getUtility(IAuthentication)</font></div><div><font class="Apple-style-span" color="#666666">        auth.unauthorized(<a href="http://principal.id">principal.id</a>,self.request)</font></div>
<div><font class="Apple-style-span" color="#666666">        if self.request.response.getStatus() not in (302,303):</font></div><div><font class="Apple-style-span" color="#666666">            return &quot;Not authorized!&quot;    </font></div>
<div><font class="Apple-style-span" color="#666666"><br></font></div><div>Then, If no application is added, the basic auth will work.</div><div>if an application added, it will use the local utility implementing IAuthentication.</div>
<div><br></div><div><br></div><div>Regards,</div><div>Shrek</div><div><br></div><div class="gmail_quote">On Sat, Nov 6, 2010 at 11:17 PM, Souheil CHELFOUH <span dir="ltr">&lt;<a href="mailto:trollfot@gmail.com">trollfot@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello Shrek,<br>
<br>
You are not alone :)<br>
The authentication process can be a pain and the stack is hardly comprehensible.<br>
What I can do is :<br>
<br>
1. Try the code you pasted on your previous messages<br>
2. Debug<br>
3. Send you a summary of what is needed to make it work.<br>
<br>
After this, I will spend time writting a tutorial to cover a bit more<br>
in-depth this issue<br>
<br>
- Souheil<br>
<br>
I will try to summariez<br>
<br>
2010/11/6 Shrek Zhou &lt;<a href="mailto:zgwmike@gmail.com">zgwmike@gmail.com</a>&gt;:<br>
&gt;<br>
&gt; Does zope.pluggableauth work for Grok 1.2 now?<br>
&gt; if it does, how to configure?<br>
&gt; --<br>
&gt; View this message in context: <a href="http://old.nabble.com/zope.pluggableauth-is-not-working.-tp30147447p30147447.html" target="_blank">http://old.nabble.com/zope.pluggableauth-is-not-working.-tp30147447p30147447.html</a><br>

&gt; Sent from the Grok mailing list archive at Nabble.com.<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Grok-dev mailing list<br>
&gt; <a href="mailto:Grok-dev@zope.org">Grok-dev@zope.org</a><br>
&gt; <a href="https://mail.zope.org/mailman/listinfo/grok-dev" target="_blank">https://mail.zope.org/mailman/listinfo/grok-dev</a><br>
&gt;<br>
</blockquote></div><br></div>