linotp.model.imported_user module

class linotp.model.imported_user.ImportedUser(resolver_name=None)

Bases: ImportedUserSchema

create_password_hash(plain_password: str) None

create a password hash entry from a given plaintext password

email
givenname
groupid
list_users() List[Dict[str, str]]

list all users of an ImportedUser instance

Returns:
List[Dict[str, str]]:

returns a list of an ImportedUser instance

mobile
password
phone
remove_all_users() None

removes all users from an ImportedUser instance

remove_user(username: str) None

remove one user from an ImportedUser instance

Args:

username (str): the name of the user wich should be deleted

set(entry: str, value: Any) None

generic setting of attributes of the user

Parameters
  • entry – attribute name

  • value – attribute value

surname
update(user: ImportedUserSchema) None

update all attributes of the user from the other user

Parameters

user – the other / previous user

user_entries = ['groupid', 'userid', 'username', 'phone', 'mobile', 'email', 'surname', 'givenname', 'password']
userid
username
exception linotp.model.imported_user.NoSuchUserError(username: str, message: str = 'User {0} does not exist')

Bases: Exception