cubicweb.pyramid.login#

Provide login views that reproduce a classical CubicWeb behavior

cubicweb.pyramid.login.includeme(config)[source]#

Create the ‘login’ route (‘/login’) and load this module views

Views#

cubicweb.pyramid.login.login_form(request)[source]#

Default view for the ‘login’ route.

Display the ‘login’ CubicWeb view, which is should be a login form

cubicweb.pyramid.login.login_password_login(request)[source]#

Handle POST of __login/__password on the ‘login’ route.

The authentication itself is delegated to the CubicWeb repository.

Request parameters:

Parameters
  • __login – The user login (or email if allow-email-login is on.

  • __password – The user password

  • __setauthcookie –

    (optional) If defined and equal to ‘1’, set the authentication cookie maxage to 1 week.

    If not, the authentication cookie is a session cookie.

cubicweb.pyramid.login.login_already_loggedin(request)[source]#

‘login’ route view for Authenticated users.

Simply redirect the user to ‘/’.