Merge pull request #39826 from cachedout/yubikey_fix

Add group func to yubikey auth
This commit is contained in:
Mike Place 2017-03-04 09:02:13 -07:00 committed by GitHub
commit cbd2a4e3cc

View file

@ -78,15 +78,16 @@ def auth(username, password):
client = Yubico(_cred['id'], _cred['key'])
try:
if client.verify(password):
return True
else:
return False
return client.verify(password)
except yubico_exceptions.StatusCodeError as e:
log.info('Unable to verify YubiKey `{0}`'.format(e))
return False
def groups(username, *args, **kwargs):
return False
if __name__ == '__main__':
__opts__ = {'yubico_users': {'damian': {'id': '12345', 'key': 'ABC123'}}}