LoginController.signinΒΆ

../_images/08.jpg

myapp/controllers/login.py:LoginController.signin()

The sign-in form sends a POST request carrying the data entered into the username and password fields.

The submitted data is checked against that held in the database by means of a User.authenticate() class method (not treated here) which retrieves the User named username and checks the submitted password against the stored value, thus maintaining good separation between generic auth’n’auth routines and data structure specifics.

If the user has successfully authenticated, then auth.login() is called with the User object as arg.

Previous topic

LoginController.index

Next topic

lib.auth.__init__.login

This Page