Skip to main content

LinOtpUserIdResolver

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

Metadata

Release files for LinOtpUserIdResolver 2.9.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for LinOtpUserIdResolver 2.9.3
File Size Uploaded
LinOtpUserIdResolver-2.9.3.tar.gz 44.9 kB Details

Release files / LinOtpUserIdResolver-2.9.3.tar.gz

Download URL LinOtpUserIdResolver-2.9.3.tar.gz
Size 44.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3b9778c561db208ab0779fbc36c11cb8b0141e179879287e2a74916bb4dd67ab
BLAKE2b-256 checksum
How to use checksums
2e4f4560c789bed5e8f8790eb86d4f88f9a754d535488a55f96c23db94dbc539
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

2.9.3 This release

1 release file

2.9.1

1 release file

2.9

1 release file

2.8.1

1 release file

2.8

1 release file

2.7.2

1 release file

2.7.1.2

1 release file

2.7.1

1 release file

2.7

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page