[auth] Use a second authtkt policy for 'rememberme'
The former solution was buggy because the expire time of the auth cookie, if
set through 'remember', was lost on the first cookie reissuing.
The new approach, make possible thanks to multiauth, use two different cookies.
One for session bounded authentication (no 'rememberme'), and one for long
lasting authentication (w 'rememberme').
The choice between the two of them is done by adding a 'persistent' argument
to the top-level 'security.remember' call. Passing this argument will inhibate
a policy or the other.
The two policies are (a little) configurable through the
'cubicweb.auth.authtkt.[session|persistent].*' variables.
Related to #4985962
Quick start
===========
.. highlight:: console
From CubicWeb
-------------
- Install everything (here with pip, possibly in a virtualenv)::
pip install pyramid-cubicweb cubicweb-pyramid pyramid_debugtoolbar
- Make sure CubicWeb is in user mode::
export CW_MODE=user
- Create a CubicWeb instance, and install the 'pyramid' cube on it (see
:ref:`configenv` for more details on this step)::
cubicweb-ctl create pyramid myinstance
.. warning::
You `must` allow anonymous access.
- Edit your ``~/etc/cubicweb.d/myinstance/all-in-one.conf`` and set values for
:confval:`pyramid-auth-secret` and :confval:`pyramid-session-secret`.
- Start the instance with the :ref:`'pyramid' command <cubicweb-ctl_pyramid>`
instead of 'start'::
cubicweb-ctl pyramid --debug myinstance
In a pyramid application
------------------------
Coming soon.