Customizing authentication in Django

The authentication that comes with Django is good enough for most common cases, but you may have needs not met by the out-of-the-box defaults. To customize authentication to your projects needs involves understanding what points of the provided system are extensible or replaceable.

Authentication backends provide an extensible system for when a username and password stored with the User model need to be authenticated against a different service than Django's default. You can give your models custom permissions that can be checked through Django's authorization system. You can extend the default User model, or substitute a completely customized model.

Other authentication sources

There may be times you have the ...

Get Mastering Django: Core now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.