Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

lino.core.auth.utils

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

Functions

activate_social_auth_testing(globals_dict[, ...])

Used for testing a development server.

Classes

AnonymousUser(username, user_type)

An instance of this will be assigned to the user attribute of anonymous incoming requests, similar to Django's approach.

class lino.core.auth.utils.AnonymousUser(username, user_type)

Bases: object

An instance of this will be assigned to the user attribute of anonymous incoming requests, similar to Django’s approach.

The memo parser uses another instance of this.

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, google=True, github=True, wikimedia=True, facebook=True)

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