Skip to main content

LinOTP2 modules for resolving usernames

Project description

LinOTP features a concept of UserIdResolvers. Such a module is used to convert a user object from any kind of user database to a distinct ID, that can be used by LinOTP to assign tokens to.

This package contains the base class for useridresolvers, the PasswdIdResolver (flat files), the LDAPIdResolver (OpenLDAP, AD, eDirectory) and the SQLIdResolver.

This package is used by the linotp package. For installation see the linotp package.

New classes can be written by inheriting the base class.

Base class

class UserIdResolver:

    fields = {"username":1, "userid":1,
    name = ""
    id = ""

    def __init(self):
        """ init - usual bootstrap hook
        """ = "UserIdResolver";

    def getUserId(self, loginName):
        """ getUserId(LoginName)
          - returns the identifier string
          - empty string if not exist


    def getUsername(self, userid):
          - returns the loginname string
          - empty string if not exist



    def getUserInfo(self, userid):
            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
        return ""

    def getResolverId(self):
        """ getResolverId(LoginName)
        - returns the resolver identifier string
          - empty string if not exist

        """ print ">>" + LoginName; """

    def getResolverType(self):
        return ''

    def loadConfig(self, config, conf):
        return self

    def checkPass(self, uid, password):
        This function checks the password for a given uid.
        - returns true in case of success
        -         false if password does not match
        return False

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for LinOtpUserIdResolver, version 2.9.3
Filename, size File type Python version Upload date Hashes
Filename, size LinOtpUserIdResolver-2.9.3.tar.gz (44.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page