6.1.1.3.2.31. linotp.lib.user module¶
contains user - related functions
- linotp.lib.user.check_user_password(username, realm, password)[source]¶
This is a helper function to check the username and password against a userstore.
return
- success — This is the username of the authenticated user. If unsuccessful,
- returns None
- linotp.lib.user.getConf(Realms, Conf)[source]¶
extract the configguration part from the resolver definition
- linotp.lib.user.getRealmBox()[source]¶
returns the config value of selfservice.realmbox. if True, the realmbox in the selfservice login will be displayed. if False, the realmbox will not be displayed and the user needs to login via user@realm
- linotp.lib.user.getResolvers(user)[source]¶
get the list of the Resolvers within a users.realm or from the resolver conf, if given in the user object
Note : It ignores the user.login attribute! Parameters: user (User object) – User with realm or resolver conf
- linotp.lib.user.getResolversOfUser(user)[source]¶
This returns the list of the Resolvers of a user in a given realm. Usually this should only return one resolver
- input:
- user.login, user.realm
- returns:
- array of resolvers, the user was found in
- linotp.lib.user.getUserFromRequest(request)[source]¶
This function first tries to get the user from * a DigestAuth and otherwise from * basic auth and otherwise from * the client certificate
- linotp.lib.user.getUserPhone(user, phone_type='phone')[source]¶
Returns the phone numer of a user
Parameters: - user (user object) – the user with the phone
- phone_type (string) – The type of the phone, i.e. either mobile or phone (land line)
Returns: list with phone numbers of this user object