Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _client(self, user, pwd):
return sasl.SimpleAuth(
sasl.DigestMD5Password,
{},
lambda: user,
lambda: pwd,
lambda: authenticator().service_type(),
lambda: authenticator().host()
)
def ClientAuth(serv_type, host, username, password):
return sasl.SimpleAuth(
sasl.DigestMD5Password,
{},
lambda: username,
lambda: password,
lambda: serv_type,
lambda: host
)
def ServerAuth(serv_type, host, users):
def user():
raise NotImplementedError
def password():
raise NotImplementedError
def get_host():
return host
return sasl.SimpleAuth(
sasl.DigestMD5Password,
users,
user,
password,
lambda: serv_type,
get_host,
realm=get_host
)