[Grok-dev] zope.pluggableauth is not working.
Christian Klinger
cklinger at novareto.de
Sun Nov 7 05:40:48 EST 2010
Hi Shrek,
i think the problem that causes the error is a missing
package called zope.app.exception. I think if you include
the package and include this zcml snippet
<include package="zope.app.exception.browser"/>
it will work.
You can have a look on this configure.zcml it registers
the same IUnauthorized View.
http://svn.zope.org/zope.app.exception/trunk/src/zope/app/exception/browser/configure.zcml?rev=75294&view=auto
Christian
>
> Hi, Souheil,
> I already did that. and found a way to make it working.
> Here are the steps.
> With all the code I pasted in the previous message.
> Add a grok view for IUnauthorized
>
> from zope.security.interfaces import IUnauthorized
> class Unauthorized(grok.View):
> grok.context(IUnauthorized)
> grok.name <http://grok.name>("index.html")
> grok.require("zope.Public")
> def render(self):
> principal=self.request.principal
> auth=getUtility(IAuthentication)
> auth.unauthorized(principal.id <http://principal.id>,self.request)
> if self.request.response.getStatus() not in (302,303):
> return "Not authorized!"
>
> Then, If no application is added, the basic auth will work.
> if an application added, it will use the local utility implementing
> IAuthentication.
>
>
> Regards,
> Shrek
>
> On Sat, Nov 6, 2010 at 11:17 PM, Souheil CHELFOUH <trollfot at gmail.com
> <mailto:trollfot at gmail.com>> wrote:
>
> Hello Shrek,
>
> You are not alone :)
> The authentication process can be a pain and the stack is hardly
> comprehensible.
> What I can do is :
>
> 1. Try the code you pasted on your previous messages
> 2. Debug
> 3. Send you a summary of what is needed to make it work.
>
> After this, I will spend time writting a tutorial to cover a bit more
> in-depth this issue
>
> - Souheil
>
> I will try to summariez
>
> 2010/11/6 Shrek Zhou <zgwmike at gmail.com <mailto:zgwmike at gmail.com>>:
> >
> > Does zope.pluggableauth work for Grok 1.2 now?
> > if it does, how to configure?
> > --
> > View this message in context:
> http://old.nabble.com/zope.pluggableauth-is-not-working.-tp30147447p30147447.html
> > Sent from the Grok mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > Grok-dev mailing list
> > Grok-dev at zope.org <mailto:Grok-dev at zope.org>
> > https://mail.zope.org/mailman/listinfo/grok-dev
> >
>
>
>
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> https://mail.zope.org/mailman/listinfo/grok-dev
More information about the Grok-dev
mailing list