lino.core.auth.utils

Utilities for authentication. Adapted from django.contrib.auth.

(This module's source code is available here.)

Classes

AnonymousUser()

A singleton class whose instance will be assigned to the user attribute of anonymous incoming requests, similar to Django's approach.

class lino.core.auth.utils.AnonymousUser

Bases: lino.utils.SimpleSingleton

A singleton class whose instance will be assigned to the user attribute of anonymous incoming requests, similar to Django's approach.

See also lino.core.site.Site.anonymous_user_type.

authenticated = False

This is always False. See also lino.modlib.users.models.User.authenticated.

get_preferences()

Return the preferences of this user. The returned object is a lino.core.userprefs.UserPrefs object.