Gestion de l’authentification¶
Modèles de données¶
Defines the information associated with a legacy account that was imported from a user DB.
This model associates a user instance with informations related to its previous database:
- which database?
- which identifier into this database?
Defines the legacy identifier associated with the account (the ID in the legacy DB).
The legacy profile can be associated with an organisation.
Defines the origin of the legacy profile (the original database).
Date at which the legacy account was last synchronized with its database.
Defines if the legacy account is synced with the original database. Defaults to False.
The user associated with the considered legacy profile.
Allows to authenticate users using Drupal 7 passwords.
The passwords that are imported from a Drupal database should be prefixed with ‘drupal$’. This hasher is inspired from the following snippet: https://djangosnippets.org/snippets/3030/
This hasher wraps existing ‘abonnements’ SHA1 passwords.
This password hasher allow to store weak hashes from the ‘abonnement’ DB (SHA1) using the PBKDF2(AbonnementsSHA1(password)) algorithm.
encode(password, salt, iterations=None, legacy_salt=None)¶
Encodes a password using the Abonnements-SHA1 algorithm from the legacy system.
encode_sha1_hash(sha1_hash, salt, iterations=None)¶
Encodes a SHA1-password that comes from the ‘abonnement’ DB.
Encodes using the crypt function from the legacy system.