Repoze.what and Max-Age

20 views
Skip to first unread message

Justin

unread,
Jan 8, 2010, 6:56:20 PM1/8/10
to pylons-discuss
I am trying to use Repoze.what with pylons. I would like to be able to
configure the expiration time for my site cookies as well as add a
remember me button to the login view. I can not seem to find any
documentation on where to configure these options though, when using
the quickstart option.

Anyhelp would be much appreciated.

Gustavo Narea

unread,
Jan 10, 2010, 12:49:12 PM1/10/10
to pylons-...@googlegroups.com
Hello, Justin.

It seems like you're configuring repoze.what and repoze.who via repoze.what-
quickstart [1].

That package configures authentication (i.e., repoze.who) so that the cookies
are handled by the AuthTktCookiePlugin [2], but that repoze.who identifier
plugin doesn't allow specifying that (yet).

So there are two options:
1.- Request this feature on <http://bugs.repoze.org/>. Chances are if you
provide a patch, it'll get a applied and a new release will be done very soon.
Then I'll update repoze.what-quickstart so you can pass this argument to
AuthTktCookiePlugin.
2.- You use your own AuthTktCookiePlugin-based identifier. But then you will
have to configure repoze.who/what manually, without repoze.what-quickstart.

I would go for option 1.

HTH,

- Gustavo.

[1] http://code.gustavonarea.net/repoze.what-quickstart/
[2]
http://static.repoze.org/whodocs/narr.html#repoze.who.plugins.auth_tkt.AuthTktCookiePlugin

--
Gustavo Narea <xri://=Gustavo>.
| Tech blog: =Gustavo/(+blog)/tech ~ About me: =Gustavo/about |

Audrius Kažukauskas

unread,
Jan 10, 2010, 1:38:12 PM1/10/10
to pylons-...@googlegroups.com
On Sun, 2010-01-10 at 17:49:12 +0000, Gustavo Narea wrote:
> Hello, Justin.
>
> It seems like you're configuring repoze.what and repoze.who via
> repoze.what- quickstart [1].
>
> That package configures authentication (i.e., repoze.who) so that the
> cookies are handled by the AuthTktCookiePlugin [2], but that
> repoze.who identifier plugin doesn't allow specifying that (yet).

I'm not sure if OP needs login session expiration, but if he does,
AuthTktCookiePlugin in latest repoze.who already supports that giving
timeout and reissue_timeout arguments to its constructor method or
make_plugin factory function. It looks like AuthTktCookiePlugin docs
are not up to date on the website ("Last updated on Jan 23, 2009."),
also there's no way to set these arguments via repoze.what-quickstart.
I think quite a few people would find that handy, although there's
always a way to bypass quickstart and configure repoze.what by yourself
(quickstart code could be used as example, it's not hard to understand).

As for "remember me" functionality, OP is left to implement it himself
or wait for someone to do that for him.

> So there are two options:
> 1.- Request this feature on <http://bugs.repoze.org/>. Chances are if
> you provide a patch, it'll get a applied and a new release will be
> done very soon. Then I'll update repoze.what-quickstart so you can
> pass this argument to AuthTktCookiePlugin.
> 2.- You use your own AuthTktCookiePlugin-based identifier. But then
> you will have to configure repoze.who/what manually, without
> repoze.what-quickstart.
>
> I would go for option 1.

--
Audrius Kažukauskas

Gustavo Narea

unread,
Jan 27, 2010, 7:12:25 PM1/27/10
to pylons-...@googlegroups.com
Thanks for the tip, Audrius!

I wasn't aware of those arguments, so I've just released repoze.what-
quickstart so people can customize the Max-Age both with Python code and .ini
files:
http://code.gustavonarea.net/repoze.what-quickstart/News.html

Cheers!

- Gustavo.

Audrius Kažukauskas

unread,
Jan 28, 2010, 8:28:38 AM1/28/10
to pylons-...@googlegroups.com
On Thu, 2010-01-28 at 00:12:25 +0000, Gustavo Narea wrote:
> Thanks for the tip, Audrius!
>
> I wasn't aware of those arguments, so I've just released repoze.what-
> quickstart so people can customize the Max-Age both with Python code and .ini
> files:
> http://code.gustavonarea.net/repoze.what-quickstart/News.html

Cool! Thanks for addition.

--
Audrius Kažukauskas

Reply all
Reply to author
Forward
0 new messages