Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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,
              "description":0,
              "phone":0,"mobile":0,"email":0,
              "givenname":0,"surname":0,"gender":0
              }
    name = ""
    id = ""

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

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

        """
        return self.id

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

        """

        return self.name

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

    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
Release History

Release History

This version
History Node

2.9.3

History Node

2.9.1.4

History Node

2.9.1

History Node

2.9.0.3

History Node

2.9

History Node

2.8.1.2

History Node

2.8.1

History Node

2.8.0.3

History Node

2.8

History Node

2.7.2

History Node

2.7.1.2

History Node

2.7.1

History Node

2.7.0.2

History Node

2.7

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
LinOtpUserIdResolver-2.9.3.tar.gz (44.9 kB) Copy SHA256 Checksum SHA256 Source Aug 14, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting