Merge pull request #8 from compunautics/patch-1

Allow user lookup by apikey
master
Guillaume GILL 5 years ago committed by GitHub
commit 0c5c0eb510
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      octoprint_auth_ldap/__init__.py

@ -50,8 +50,8 @@ class LDAPUserManager(FilebasedUserManager,
if FilebasedUserManager.findUser(self, username) is not None:
return FilebasedUserManager.changeUserPassword(self, username, password)
def findUser(self, userid=None, session=None):
local_user = FilebasedUserManager.findUser(self, userid, session)
def findUser(self, userid=None, apikey=None, session=None):
local_user = FilebasedUserManager.findUser(self, userid, apikey, session)
#If user not exists in local database, search it on LDAP
if userid and not local_user:
if(self.findLDAPUser(userid)):

Loading…
Cancel
Save