lino.core.auth.utils

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

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

Functions

activate_social_auth_testing(globals_dict[, ...])

Used for testing a development server.

Classes

AnonymousUser(*args, **kwargs)

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(*args, **kwargs)

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.

is_authenticated = False

This is always False. See also lino.modlib.users.User.is_authenticated.

get_preferences()

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

lino.core.auth.utils.activate_social_auth_testing(globals_dict, has_google=False)

Used for testing a development server. See for example the settings.py of lino_book.projects.noi1e.