-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/22/2011 11:29 PM, Iain Duncan wrote:

> I'm porting a bfg framework extension to pyramid, and auth was handled by
> repoze.who with a custom authentication plugin. I see from the release notes
> ( and my apps behaviour ) that I now need to make repoze.who react to 403's
> by presenting it's login challenge. However, I'm not at the point of
> thoroughly grokking the dark arts of repoze.who, and googling is turning up
> nothing so far, can anyone tell me what to do or point me at docs explaining
> how to configure repoze.who to react to '403 Forbidden'?

You need to configure the "Redirector" plugin (*not*
"RedirectingFormPlugin", which is now deprecated) with the URL of your
login form.  The extended who.ini example in the docs does that:

http://docs.repoze.org/who/2.0/configuration.html#configuring-repoze-who-via-config-file

That configuration will work fine if you deploy r.who 2.0 as middleware,
although your login form is likely to need to use the r.who API object
to authenticate and remember the form credentials.  See here for how
that would work:

http://docs.repoze.org/who/2.0/api.html#mixed-use-of-repoze-who-middleware-and-api

Note:  repoze.who is now hosted at github:

  https://github.com/repoze/repoze.who

I'll be happy to land patches to improve the docs!


Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tsea...@palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1kj8AACgkQ+gerLs4ltQ6AKgCfWwK77WlsHZQufasT/6A/i5Ea
IJAAoMTfa6gEZ2b4S/VkPJEpeMl3/DRe
=chlh
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to