5.4. UserIdResolver Modules¶
If you need to develop a new useridresolver that is to be loaded into LinOTP, this useridresolver needs to be a Python class, that inherits from the Python class UserIdResolver. Here you may find the minimum set of methods that needs to be implemented here:
For an detailed example, how these methods get implemented, you may consult the interface and implementation of the PasswdIdResolver:
Please note, that new UserIdResolvers need to comply with the AGPLv3 License and need also to be published under the AGPLv3 License.
- class useridresolver.UserIdResolver.UserIdResolver[source]¶
- checkPass(uid, password)[source]¶
This function checks the password for a given uid. - returns true in case of success - false if password does not match
- getResolverId()[source]¶
getResolverId(LoginName) - returns the resolver identifier string - empty string if not exist
- getUserId(loginName)[source]¶
getUserId(LoginName) - returns the identifier string - empty string if not exist
- getUserInfo(UserID)[source]¶
This function returns all user information for a given user object identified by UserID. Return value is a dictionary, if no object is found, the dictionary is empty
- getUserList(serachDict)[source]¶
searchUserList(key, value) This function finds the user objects, that have the term ‘value’ in the user object field ‘key’ The key may be something like ‘loginname’ or ‘email’. The value is a regular expression. Return value is a list of dictionaries (each dictionary contains a user object) or an empty string if no object is found.